Class PDShadingPattern
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern
-
- com.tom_roush.pdfbox.pdmodel.graphics.pattern.PDShadingPattern
-
- All Implemented Interfaces:
COSObjectable
public class PDShadingPattern extends PDAbstractPattern
A shading pattern dictionary.
-
-
Field Summary
-
Fields inherited from class com.tom_roush.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern
TYPE_SHADING_PATTERN, TYPE_TILING_PATTERN
-
-
Constructor Summary
Constructors Constructor Description PDShadingPattern()Creates a new shading pattern.PDShadingPattern(COSDictionary resourceDictionary)Creates a new shading pattern from the given COS dictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDExtendedGraphicsStategetExtendedGraphicsState()This will get the external graphics state for this pattern.intgetPatternType()This will return the pattern type.PDShadinggetShading()This will get the shading resources for this pattern.voidsetExternalGraphicsState(PDExtendedGraphicsState extendedGraphicsState)This will set the external graphics state for this pattern.voidsetShading(PDShading shadingResources)This will set the shading resources for this pattern.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.graphics.pattern.PDAbstractPattern
create, getCOSObject, getMatrix, getType, setMatrix, setPaintType, setPatternType
-
-
-
-
Constructor Detail
-
PDShadingPattern
public PDShadingPattern()
Creates a new shading pattern.
-
PDShadingPattern
public PDShadingPattern(COSDictionary resourceDictionary)
Creates a new shading pattern from the given COS dictionary.- Parameters:
resourceDictionary- The COSDictionary for this pattern resource.
-
-
Method Detail
-
getPatternType
public int getPatternType()
Description copied from class:PDAbstractPatternThis will return the pattern type.- Specified by:
getPatternTypein classPDAbstractPattern- Returns:
- The pattern type
-
getExtendedGraphicsState
public PDExtendedGraphicsState getExtendedGraphicsState()
This will get the external graphics state for this pattern.- Returns:
- The extended graphics state for this pattern.
-
setExternalGraphicsState
public void setExternalGraphicsState(PDExtendedGraphicsState extendedGraphicsState)
This will set the external graphics state for this pattern.- Parameters:
extendedGraphicsState- The new external graphics state for this pattern.
-
getShading
public PDShading getShading() throws IOException
This will get the shading resources for this pattern.- Returns:
- The shading resources for this pattern.
- Throws:
IOException- if something went wrong
-
setShading
public void setShading(PDShading shadingResources)
This will set the shading resources for this pattern.- Parameters:
shadingResources- The new shading resources for this pattern.
-
-