CHAPTER 6
510
Rendering
The smoothness tolerance may also interact with the accuracy of color conver-
sion. In the case of a color conversion defined by a sampled function, the con-
version function is unknown. Thus the error may be sampled at too low a
frequency, in which case the accuracy defined by the smoothness tolerance can-
not be guaranteed. In most cases, however, where the conversion function is
smooth and continuous, the accuracy should be within the specified tolerance.
The effect of the smoothness tolerance is similar to that of the flatness tolerance.
Note, however, that flatness is measured in device-dependent units of pixel width,
whereas smoothness is measured as a fraction of color component range.
6.5.3 Scan Conversion Rules
The following rules determine which device pixels a painting operation affects.
All references to coordinates and pixels are in device space. A
shape
is a path to be
painted with the current color or with an image. Its coordinates are mapped into
device space but not rounded to device pixel boundaries. At this level, curves
have been flattened to sequences of straight lines, and all “insideness” computa-
tions have been performed.
Pixel boundaries always fall on integer coordinates in device space. A pixel is a
square region identified by the location of its corner with minimum horizontal
and vertical coordinates. The region is
half-open,
meaning that it includes its
lower but not its upper boundaries. More precisely, for any point whose real-
number coordinates are (x,
y),
let
i
=
floor (x) and
j
=
floor (y). The pixel that con-
tains this point is the one identified as (i,
j).
The region belonging to that pixel is
defined to be the set of points (x
′,
y
′)
such that
i
x
′ <
i
+
1 and
j
y
′ <
j
+
1.
Like pixels, shapes to be painted by filling and stroking operations are also treated
as half-open regions that include the boundaries along their “floor” sides, but not
along their “ceiling” sides.
A shape is scan-converted by painting any pixel whose square region intersects
the shape, no matter how small the intersection is. This ensures that no shape
ever disappears as a result of unfavorable placement relative to the device pixel
grid, as might happen with other possible scan conversion rules. The area cov-
ered by painted pixels is always at least as large as the area of the original shape.
This rule applies both to fill operations and to strokes with nonzero width. Zero-
width strokes are done in a device-dependent manner that may include fewer
pixels than the rule implies.
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.