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

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
      extended by org.apache.pdfbox.pdmodel.graphics.pattern.PDShadingPatternResources
All Implemented Interfaces:
COSObjectable

public class PDShadingPatternResources
extends PDPatternResources

This represents the resources for a shading pattern.

Version:
$Revision: 1.0 $

Field Summary
 
Fields inherited from class org.apache.pdfbox.pdmodel.graphics.pattern.PDPatternResources
SHADING_PATTERN, TILING_PATTERN
 
Constructor Summary
PDShadingPatternResources()
          Default constructor.
PDShadingPatternResources(COSDictionary resourceDictionary)
          Prepopulated pattern resources.
 
Method Summary
 PDExtendedGraphicsState getExtendedGraphicsState()
          This will get the extended graphics state for this pattern.
 Matrix getMatrix()
          This will get the optional Matrix of a Pattern.
 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(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 class PDPatternResources
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(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 IOException
This will get the shading resources for this pattern.

Returns:
The shading resourcesfor this pattern.
Throws:
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 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


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.