Previous Next
320
CHAPTER 4 Graphics
TABLE 4.33 Additional entries specific to a type 5 shading dictionary
KEY TYPE VALUE
BitsPerCoordinate integer (Required) The number of bits used to represent each vertex coordinate.
Valid values are 1, 2, 4, 8, 12, 16, 24, and 32.
BitsPerComponent integer (Required) The number of bits used to represent each color component.
Valid values are 1, 2, 4, 8, 12, and 16.
VerticesPerRow integer (Required) The number of vertices in each row of the lattice; the value
must be greater than or equal to 2. The number of rows need not be
specified.
Decode array (Required) An array of numbers specifying how to map vertex coordinates
and color components into the appropriate ranges of values. The decoding
method is similar to that used in image dictionaries (see “Decode Arrays”
on page 344). The ranges are specified as follows:
[ xmin xmax ymin ymax c1,min c1,max … cn,min cn,max ]
Note that only one pair of c values should be specified if a Function entry
is present.
Function function (Optional) A 1-in, n-out function or an array of n 1-in, 1-out functions
(where n is the number of color components in the shading dictionary’s
color space). If this entry is present, the color data for each vertex must be
specified by a single parametric variable rather than by n separate color
components. The designated function(s) are called with each interpolated
value of the parametric variable to determine the actual color at each
point. Each input value is forced into the range interval specified for the
corresponding color component in the shading dictionary’s Decode array.
Each function’s domain must be a superset of that interval. If the value re-
turned by the function for a given color component is out of range, it is
adjusted to the nearest valid value.
This entry cannot be used with an Indexed color space.
All vertex coordinates are expressed in the shading’s target coordinate space. If
the shading dictionary includes a Function entry, only a single parametric value,
t, is permitted for each vertex in place of the color components c1 … cn .
The VerticesPerRow entry in the shading dictionary gives the number of vertices
in each row of the lattice. All of the vertices in a row are specified sequentially,
followed by those for the next row. Given m rows of k vertices each, the triangles
Previous Next