Class PDTilingPatternResources

java.lang.Object
org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPatternResources
All Implemented Interfaces:
COSObjectable

public class PDTilingPatternResources extends PDPatternResources
This represents the resources for a tiling pattern.
Version:
$Revision: 1.0 $
  • Constructor Details

    • PDTilingPatternResources

      public PDTilingPatternResources()
      Default constructor.
    • PDTilingPatternResources

      public PDTilingPatternResources(COSDictionary resourceDictionary)
      Prepopulated pattern resources.
      Parameters:
      resourceDictionary - The COSDictionary for this pattern resource.
  • Method Details

    • getPatternType

      public int getPatternType()
      This will return the pattern type.
      Specified by:
      getPatternType in class PDPatternResources
      Returns:
      The pattern type
    • setLength

      public void setLength(int length)
      This will set the length of the content stream.
      Overrides:
      setLength in class PDPatternResources
      Parameters:
      length - The new stream length.
    • getLength

      public int getLength()
      This will return the length of the content stream.
      Overrides:
      getLength in class PDPatternResources
      Returns:
      The length of the content stream
    • setPaintType

      public void setPaintType(int paintType)
      This will set the paint type.
      Overrides:
      setPaintType in class PDPatternResources
      Parameters:
      paintType - The new paint type.
    • getPaintType

      public int getPaintType()
      This will return the paint type.
      Returns:
      The paint type
    • setTilingType

      public void setTilingType(int tilingType)
      This will set the tiling type.
      Parameters:
      tilingType - The new tiling type.
    • getTilingType

      public int getTilingType()
      This will return the tiling type.
      Returns:
      The tiling type
    • setXStep

      public void setXStep(int xStep)
      This will set the XStep value.
      Parameters:
      xStep - The new XStep value.
    • getXStep

      public int getXStep()
      This will return the XStep value.
      Returns:
      The XStep value
    • setYStep

      public void setYStep(int yStep)
      This will set the YStep value.
      Parameters:
      yStep - The new YStep value.
    • getYStep

      public int getYStep()
      This will return the YStep value.
      Returns:
      The YStep value
    • getResources

      public PDResources getResources()
      This will get the resources for this pattern. This will return null if no resources are available at this level.
      Returns:
      The resources for this pattern.
    • setResources

      public void setResources(PDResources resources)
      This will set the resources for this pattern.
      Parameters:
      resources - The new resources for this pattern.
    • getBBox

      public PDRectangle getBBox()
      An array of four numbers in the form coordinate system (see below), giving the coordinates of the left, bottom, right, and top edges, respectively, of the pattern's bounding box.
      Returns:
      The BBox of the form.
    • setBBox

      public void setBBox(PDRectangle bbox)
      This will set the BBox (bounding box) for this Pattern.
      Parameters:
      bbox - The new BBox for this Pattern.
    • getMatrix

      public Matrix getMatrix()
      This will get the optional Matrix of a Pattern. It maps the form space into the user space
      Returns:
      the form matrix
    • setMatrix

      public void setMatrix(AffineTransform transform)
      Sets the optional Matrix entry for the Pattern.
      Parameters:
      transform - the transformation matrix
    • getPaint

      public Paint getPaint(int pageHeight) throws IOException
      This will return the paint of the pattern.
      Specified by:
      getPaint in class PDPatternResources
      Parameters:
      pageHeight - the height of the current page
      Returns:
      the paint of the pattern
      Throws:
      IOException