Class PDShadingPatternResources

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

public class PDShadingPatternResources extends PDPatternResources
This represents the resources for a shading pattern.
  • Constructor Details

    • PDShadingPatternResources

      public PDShadingPatternResources()
      Default constructor.
    • PDShadingPatternResources

      public PDShadingPatternResources(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
    • 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
    • getExtendedGraphicsState

      public PDExtendedGraphicsState getExtendedGraphicsState()
      This will get the extended graphics state for this pattern.
      Returns:
      The extended graphics state for this pattern.
    • setExtendedGraphicsState

      public void setExtendedGraphicsState(PDExtendedGraphicsState extendedGraphicsState)
      This will set the extended graphics state for this pattern.
      Parameters:
      extendedGraphicsState - The new extended graphics state for this pattern.
    • getShading

      public PDShadingResources getShading() throws IOException
      This will get the shading resources for this pattern.
      Returns:
      The shading resourcesfor this pattern.
      Throws:
      IOException - if something went wrong
    • setShading

      public void setShading(PDShadingResources shadingResources)
      This will set the shading resources for this pattern.
      Parameters:
      shadingResources - The new shading resources for this pattern.
    • 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