Class PDShadingPatternResources

  • All Implemented Interfaces:
    COSObjectable

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

      • PDShadingPatternResources

        public PDShadingPatternResources()
        Default constructor.
      • PDShadingPatternResources

        public PDShadingPatternResources​(COSDictionary resourceDictionary)
        Prepopulated pattern resources.
        Parameters:
        resourceDictionary - The COSDictionary for this pattern resource.
    • Method Detail

      • 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​(java.awt.geom.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 java.io.IOException
        This will get the shading resources for this pattern.
        Returns:
        The shading resourcesfor this pattern.
        Throws:
        java.io.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 java.awt.Paint getPaint​(int pageHeight)
                                throws java.io.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:
        java.io.IOException