Class PDTilingPatternResources
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
-
- org.apache.pdfbox.pdmodel.graphics.pattern.PDTilingPatternResources
-
- All Implemented Interfaces:
COSObjectable
public class PDTilingPatternResources extends PDPatternResources
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
Constructors Constructor Description PDTilingPatternResources()
Default constructor.PDTilingPatternResources(COSDictionary resourceDictionary)
Prepopulated pattern resources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDRectangle
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.int
getLength()
This will return the length of the content stream.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
getPaintType()
This will return the paint type.int
getPatternType()
This will return the pattern type.PDResources
getResources()
This will get the resources for this pattern.int
getTilingType()
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(java.awt.geom.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 Detail
-
PDTilingPatternResources
public PDTilingPatternResources()
Default constructor.
-
PDTilingPatternResources
public PDTilingPatternResources(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
-
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
public PDResources 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
public void setResources(PDResources resources)
This will set the resources for this pattern.- Parameters:
resources
- The new resources for this pattern.
-
getBBox
public PDRectangle 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
public void setBBox(PDRectangle bbox)
This will set the BBox (bounding box) for this Pattern.- Parameters:
bbox
- The new BBox for this Pattern.
-
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
-
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
-
-