$canvas->createRectangle(x1, y1, x2, y2, ?option, value, option, value, ...?) The arguments x1, y1, x2, and y2 give the coordinates of two diagonally opposite corners of the rectangle (the rectangle will include its upper and left edges but not its lower or right edges).