Previous Next


                                                      315
           SECTION 4.6                                                                        Patterns




                    TABLE 4.32 Additional entries specific to a type 4 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.

BitsPerFlag          integer         (Required) The number of bits used to represent the edge flag for each ver-
                                     tex (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, and 2.

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 may not be used with an Indexed color space.

           Unlike shading types 1 to 3, types 4 to 7 are represented as streams. Each stream
           contains a sequence of vertex coordinates and color data that defines the triangle
           mesh. In a type 4 shading, each vertex is specified by the following values, in the
           order shown:

              f x y c1 … cn

Previous Next