Coordinate SystemGetting Started UserGuide Lines and Rectangles Geometric shapes and text are drawn on the canvas by specifying points in the twodimensional discrete Cartesian coordinate system. The points on the canvas correspond to pixels on the screen. Thus, the actual size of the canvas and the geometric shapes depends on the resolution of your screen. While points on the canvas are specified as discrete Cartesian coordinates, the canvas coordinate system is different from the one used in mathematics. Specifically, the canvas is configured such that the origin (0, 0) is at the upperleft corner and the ycoordinate grows downward. Thus, the positive xcoordinate indicates a horizontal offset from the leftside of the canvas and the positive ycoordinate indicates a vertical offset from the top of the canvas. For example, suppose we want to specify two points on a canvas with one point at position (10, 20) and the other at position (40, 9). The location of the two points on the canvas are illustrated below


Last modified: August 17, 2013, at 08:30 AM.
