2.2. The Coordinate System

Understanding the coordinate system is another important part of graphics programming. The coordinate system represents the positions of graphic objects on a display device such as a monitor or a printer.

2.2.1. The Cartesian Coordinate System

The Cartesian coordinate system (shown in Figure 2.2) divides a two-dimensional plane into four regions, also called quadrants, and two axes: x and y. The x-axis is represented by a horizontal line and the y-axis by a vertical line. An ordered pair of x and y positions defines a point in a plane. The origin of the plane is a point with x = 0 and y = 0 values, and the quadrants divide the plane relative to the origin.

Figure 2.2. The Cartesian coordinate system

To find out ...

Get Graphics Programming with GDI+ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.