Class PatternType1

java.lang.Object
com.sun.pdfview.pattern.PDFPattern
com.sun.pdfview.pattern.PatternType1

public class PatternType1 extends PDFPattern
A type 1 (tiling) pattern
  • Field Details

    • PAINT_COLORED

      public static final int PAINT_COLORED
      paint types
      See Also:
    • PAINT_UNCOLORED

      public static final int PAINT_UNCOLORED
      See Also:
    • TILE_CONSTANT

      public static final int TILE_CONSTANT
      tiling types
      See Also:
    • TILE_NODISTORT

      public static final int TILE_NODISTORT
      See Also:
    • TILE_FASTER

      public static final int TILE_FASTER
      See Also:
    • resources

      private HashMap<String,PDFObject> resources
      the resources used by the image we will tile
    • paintType

      private int paintType
      the paint type (colored or uncolored)
    • tilingType

      private int tilingType
      the tiling type (constant, no distort or faster)
    • bbox

      private Rectangle2D bbox
      the bounding box of the tile, in tile space
    • xStep

      private int xStep
      the horiztonal tile spacing, in tile space
    • yStep

      private int yStep
      the vertical spacing, in tile space
    • data

      private byte[] data
      the stream data
  • Constructor Details

    • PatternType1

      public PatternType1()
      Creates a new instance of PatternType1
  • Method Details

    • parse

      protected void parse(PDFObject patternObj, Map rsrc) throws IOException
      Parse the pattern from the PDFObject Note the resources passed in are ignored...
      Specified by:
      parse in class PDFPattern
      Parameters:
      patternObj - the pdfobject with data for this pattern
      Throws:
      IOException
    • getPaint

      public PDFPaint getPaint(PDFPaint basePaint)
      Create a PDFPaint from this pattern and set of components. This creates a buffered image of this pattern using the given paint, then uses that image to create the correct TexturePaint to use in the PDFPaint.
      Specified by:
      getPaint in class PDFPattern
      Parameters:
      basePaint - the base paint to use, or null if not needed
    • getResources

      public HashMap<String,PDFObject> getResources()
      get the associated resources
    • getPaintType

      public int getPaintType()
      get the paint type
    • getTilingType

      public int getTilingType()
      get the tiling type
    • getBBox

      public Rectangle2D getBBox()
      get the bounding box
    • getXStep

      public int getXStep()
      get the x step
    • getYStep

      public int getYStep()
      get the y step