Next Previous Up Top Contents Index

6.4 Rendering conventions for geometric shapes

6.4.1 Permissible alternatives during rendering

Some platforms may distinguish between lines of the minimum thinness from lines that are thicker than that. The two rasterizations depicted in Figure 6.6 are both perfectly reasonable rasterizations of tilted lines that are a single device unit wide. The right-hand line is drawn as a tilted rectangle, the left as the "thinnest visible" line.

Figure 6.6 Two examples of lines of thickness 1

For thick lines, a platform may choose to draw the exact tilted fractional rectangle, or the coordinates of that rectangle might be rounded so that it is distorted into another polygonal shape. The latter case may be prove to be faster on some platforms. The two rasterizations depicted in Figure 6.7 are both reasonable.

Figure 6.7 Two examples of lines of thickness 2

The decision about which side of the shape to take when a boundary line passes through the decision point is made arbitrarily, although this is compatible with the X11 definition. This is not necessarily the most convenient decision. The main problem with this is illustrated by the case of a horizontal line (see Figure 6.8). The DUIM definition draws the rectangular slice above the coordinates, since those pixels are the ones whose centers have the figure immediately above them. This definition makes it simpler to draw rectilinear borders around rectilinear areas.

Figure 6.8 Two possible definitions of horizontal lines. Left figure is X11 definition


Functional Developer Library Reference: DUIM - 3 Dec 1998

Next Previous Up Top Contents Index