A coordinate space is a planar space based on the Cartesian coordinate system. This system provides a means of specifying the location of each point on a plane. It requires two axes that are perpendicular and equal in length. The following illustration shows a coordinate space.
The system supports four coordinate spaces, as described in the following table.
Coordinate Space | Description |
---|---|
world | Applications use world space to rotate, shear, or reflect graphics output. World space measures 2^32 units high by 2^32 units wide. |
page | Page space (referred to as logical space in 16-bit versions of Windows) also measures 2^32 units high by 2^32 units wide. |
Device | Device space measures 2^27 units high by 2^27 units wide. |
Physical device | Physical device, usually refers to the client area of the application's window; however, it can also include the entire desktop, a complete window (including the frame, title bar, and menu bar), or a page of printer or plotter paper. Physical device dimensions vary according to the dimensions set by the display, printer, or plotter technology. |
Page space works with device space to provide applications with device-independent units, such as millimeters and inches. This overview refers to both world space and page space as logical space.
To depict output on a physical device, the system copies (or maps) a rectangular region from one coordinate space into the next coordinate space until finally the output appears in its entirety on the physical device. Mapping begins in the application's world space if the application has called the SetWorldTransform function; otherwise, mapping occurs in page space. As the system copies each point within the rectangular region from one space into another, it applies an algorithm called a transformation. A transformation alters (or transforms) the size, orientation, and shape of objects that are copied from one coordinate space into another. Although a transformation affects an object as a whole, it is applied to each point, or to each line, in the object.
The following illustration shows a typical transformation performed by using the SetWorldTransform function.