org.apache.pdfbox.pdmodel.graphics.pattern
Class PDTilingPatternResources

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
      extended by 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
PDTilingPatternResources()
          Default constructor.
PDTilingPatternResources(COSDictionary resourceDictionary)
          Prepopulated pattern resources.
 
Method Summary
 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.
 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(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 class PDPatternResources
Returns:
The pattern type

setLength

public void setLength(int length)
This will set the length of the content stream.

Overrides:
setLength in class PDPatternResources
Parameters:
length - The new stream length.

getLength

public int getLength()
This will return the length of the content stream.

Overrides:
getLength in class PDPatternResources
Returns:
The length of the content stream

setPaintType

public void setPaintType(int paintType)
This will set the paint type.

Overrides:
setPaintType in class PDPatternResources
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(AffineTransform transform)
Sets the optional Matrix entry for the Pattern.

Parameters:
transform - the transformation matrix

getPaint

public Paint getPaint(int pageHeight)
               throws IOException
This will return the paint of the pattern.

Specified by:
getPaint in class PDPatternResources
Returns:
the paint of the pattern
Throws:
IOException