Class PDTilingPatternResources
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPatternResources
- All Implemented Interfaces:
COSObjectable
This represents the resources for a tiling pattern.
- Version:
- $Revision: 1.0 $
-
Field Summary
Fields inherited from class org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
SHADING_PATTERN, TILING_PATTERN
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PDTilingPatternResources
(COSDictionary resourceDictionary) Prepopulated pattern resources. -
Method Summary
Modifier and TypeMethodDescriptiongetBBox()
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.int
This will return the length of the content stream.This will get the optional Matrix of a Pattern.getPaint
(int pageHeight) This will return the paint of the pattern.int
This will return the paint type.int
This will return the pattern type.This will get the resources for this pattern.int
This will return the tiling type.int
getXStep()
This will return the XStep value.int
getYStep()
This will return the YStep value.void
setBBox
(PDRectangle bbox) This will set the BBox (bounding box) for this Pattern.void
setLength
(int length) This will set the length of the content stream.void
setMatrix
(AffineTransform transform) Sets the optional Matrix entry for the Pattern.void
setPaintType
(int paintType) This will set the paint type.void
setResources
(PDResources resources) This will set the resources for this pattern.void
setTilingType
(int tilingType) This will set the tiling type.void
setXStep
(int xStep) This will set the XStep value.void
setYStep
(int yStep) This will set the YStep value.Methods inherited from class org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
create, getCOSDictionary, getCOSObject, getFilter, getType, setFilter, setPatternType
-
Constructor Details
-
PDTilingPatternResources
public PDTilingPatternResources()Default constructor. -
PDTilingPatternResources
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 classPDPatternResources
- Returns:
- The pattern type
-
setLength
public void setLength(int length) This will set the length of the content stream.- Overrides:
setLength
in classPDPatternResources
- Parameters:
length
- The new stream length.
-
getLength
public int getLength()This will return the length of the content stream.- Overrides:
getLength
in classPDPatternResources
- Returns:
- The length of the content stream
-
setPaintType
public void setPaintType(int paintType) This will set the paint type.- Overrides:
setPaintType
in classPDPatternResources
- 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
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
This will set the resources for this pattern.- Parameters:
resources
- The new resources for this pattern.
-
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
This will set the BBox (bounding box) for this Pattern.- Parameters:
bbox
- The new BBox for this Pattern.
-
getMatrix
This will get the optional Matrix of a Pattern. It maps the form space into the user space- Returns:
- the form matrix
-
setMatrix
Sets the optional Matrix entry for the Pattern.- Parameters:
transform
- the transformation matrix
-
getPaint
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:
IOException
-