Previous Next


                                               290
      CHAPTER 4                                                                     Graphics



      Patterns come in two varieties:

      • Tiling patterns consist of a small graphical figure (called a pattern cell) that is
        replicated at fixed horizontal and vertical intervals to fill the area to be painted.
        The graphics objects to use for tiling are described by a content stream.
      • Shading patterns define a gradient fill that produces a smooth transition
        between colors across the area. The color to use is specified as a function of
        position using any of a variety of methods.

      Note: The ability to paint with patterns is a feature of PDF 1.2 (tiling patterns) and
      PDF 1.3 (shading patterns). With some effort, it is possible to achieve a limited form
      of tiling patterns in PDF 1.1 by defining them as character glyphs in a special font
      and painting them repeatedly with the Tj operator. Another technique, defining
      patterns as halftone screens, is not recommended because the effects produced are
      device-dependent.

      Patterns are specified in a special family of color spaces named Pattern. These
      spaces use pattern objects as the equivalent of color values instead of the numeric
      component values used with other spaces. A pattern object may be a dictionary
      or a stream, depending on the type of pattern; the term pattern dictionary is used
      generically throughout this section to refer to either a dictionary object or the
      dictionary portion of a stream object. (Those pattern objects that are streams are
      specifically identified as such in the descriptions of particular pattern types; un-
      less otherwise stated, they are understood to be simple dictionaries instead.) This
      section describes Pattern color spaces and the specification of color values within
      them. See Section 4.5, “Color Spaces,” for information about color spaces and col-
      or values in general and Section 7.5.6, “Patterns and Transparency,” for further
      discussion of the treatment of patterns in the transparent imaging model.


4.6.1 General Properties of Patterns

      A pattern dictionary contains descriptive information defining the appearance
      and properties of a pattern. All pattern dictionaries contain an entry named
      PatternType, whose value identifies the kind of pattern the dictionary describes:
      type 1 for a tiling pattern or type 2 for a shading pattern. The remaining contents
      of the dictionary depend on the pattern type and are detailed below in the sec-
      tions on individual pattern types.

Previous Next