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.
-
-
Field Summary
-
Fields inherited from class org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
SHADING_PATTERN, TILING_PATTERN
-
-
Constructor Summary
Constructors Constructor Description PDShadingPatternResources()
Default constructor.PDShadingPatternResources(COSDictionary resourceDictionary)
Prepopulated pattern resources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDExtendedGraphicsState
getExtendedGraphicsState()
This will get the extended graphics state for this pattern.Matrix
getMatrix()
This will get the optional Matrix of a Pattern.java.awt.Paint
getPaint(int pageHeight)
This will return the paint of the pattern.int
getPatternType()
This will return the pattern type.PDShadingResources
getShading()
This will get the shading resources for this pattern.void
setExtendedGraphicsState(PDExtendedGraphicsState extendedGraphicsState)
This will set the extended graphics state for this pattern.void
setMatrix(java.awt.geom.AffineTransform transform)
Sets the optional Matrix entry for the Pattern.void
setShading(PDShadingResources shadingResources)
This will set the shading resources for this pattern.-
Methods inherited from class org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
create, getCOSDictionary, getCOSObject, getFilter, getLength, getType, setFilter, setLength, setPaintType, setPatternType
-
-
-
-
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 classPDPatternResources
- 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 classPDPatternResources
- Parameters:
pageHeight
- the height of the current page- Returns:
- the paint of the pattern
- Throws:
java.io.IOException
-
-