Previous Next


                                                      324
           CHAPTER 4                                                                          Graphics




                    TABLE 4.34 Additional entries specific to a type 6 shading dictionary
KEY                  TYPE            VALUE

BitsPerCoordinate    integer         (Required) The number of bits used to represent each geometric coordi-
                                     nate. 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.

BitsPerFlag          integer         (Required) The number of bits used to represent the edge flag for each
                                     patch (see below). Valid values of BitsPerFlag are 2, 4, and 8, but only the
                                     least significant 2 bits in each flag value are used. Valid values for the edge
                                     flag are 0, 1, 2, and 3.

Decode               array           (Required) An array of numbers specifying how to map 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 may not be used with an Indexed color space.

           The data stream provides a sequence of Bézier control points and color values
           that define the shape and colors of each patch. All of a patch’s control points are
           given first, followed by the color values for its corners. Note that this differs from
           a triangle mesh (shading types 4 and 5), in which the coordinates and color of
           each vertex are given together. All control point coordinates are expressed in the
           shading’s target coordinate space. See “Type 4 Shadings (Free-Form Gouraud-

Previous Next