Graphics Environment: 5.3 Coordinate Space: Precise Coordinates

Up: GEOS SDK TechDocs| Up | Prev: 5.2 Coordinate Transformations | Next: 5.4 Device Coordinates

As has been previously stated, coordinates are normally given in typographer's points. Most graphics commands accept coordinates accurate to the nearest point. This should be more than sufficient for most geodes, but for those specialized programs, more precise drawing is possible.

For simple cases, it is possible to create precise drawings by scaling the drawings. To make drawings accurate to one fourth of a point, for example, scale by 25% and multiply all coordinates accordingly. However, this approach is limited and may result in confusing code.

Another way to make precise drawings is to use the graphics commands which have been specially set up to take more precise coordinates. These commands will not be described in detail here, but keep them in mind when planning ultra-high resolution applications. GrRelMoveTo() , GrDrawRelLineTo() , GrDrawRelCurveTo() , and GrDrawRelArc3PointTo() take WWFixed coordinates, and are thus accurate to a fraction of a point. To draw a precise outline, use these commands to draw the components of the outline. To fill an area, use the precise drawing commands to describe the path forming the outline of the area, then fill the path.


Up: GEOS SDK TechDocs| Up | Prev: 5.2 Coordinate Transformations | Next: 5.4 Device Coordinates