About Coordinate Spaces

Most of the GPI functions draw their output in a conceptual area called the world coordinate space. If you picture the presentation space as a blank canvas on which to draw, the world coordinate space is a Cartesian grid that provides a reference of scale for what is being drawn.

The components of a picture defined in a world coordinate space are often defined to a scale convenient only to that component. Applications also can define each component, or subpicture, starting at the origin (0,0). This enables applications to define the scale of a subpicture and the location of the subpicture separately. The ability to define all subpictures at the origin means there is not always 1-to-1 correspondence between a presentation space and a world coordinate space. Frequently a separate world coordinate space exists for every subpicture.

After subpictures are defined in the world coordinate space, they undergo a process called transformation and then appear on an output device. If an application has not specifically applied a transformation to its subpictures, by default the PM applies the identity transformation, which, in effect, makes no changes to the subpicture.

All graphics systems, not just the PM, use at least one coordinate space to generate output. The simplest graphics systems use a single coordinate space, whose points are the pels on the display. These are sometimes called single-space systems.

The PM creates multiple coordinate spaces and uses transformations to move subpictures between the coordinate spaces. The PM assembles the application's graphic output in a process that can use up to five coordinate spaces, known collectively as the viewing pipeline. The PM coordinate spaces are:

For those who are more familiar with a graphics system that uses a single-coordinate space, the following table lists the differences to expect when using PM's multi-coordinate space.

┌──────────────────────────────┬──────────────────────────────┐│Single-Coordinate Space       │PM Multi-Coordinate System    │
│Systems                       │                              │
├──────────────────────────────┼──────────────────────────────┤
│Distances and locations       │Seven units of measurement,   │
│specified in pels.            │including pels, are available.│
├──────────────────────────────┼──────────────────────────────┤
│Because the shape, or aspect  │The output is device          │
│ratio, and size of pels can   │independent.                  │
│vary on different devices, the│                              │
│graphic primitives on one     │                              │
│device might look different on│                              │
│another.                      │                              │
├──────────────────────────────┼──────────────────────────────┤
│Coordinates entered must      │Coordinates are made          │
│already be device coordinates.│device-compatible through the │
│                              │PM.                           │
└──────────────────────────────┴──────────────────────────────┘

Additionally, a single-space system requires that applications keep track of:


[Back: Coordinate Spaces and Transformations]
[Next: World Coordinate Space]