COSObjectable
PDShadingPatternResources
, PDTilingPatternResources
public abstract class PDPatternResources extends java.lang.Object implements COSObjectable
Modifier and Type | Field | Description |
---|---|---|
static int |
SHADING_PATTERN |
|
static int |
TILING_PATTERN |
Constructor | Description |
---|---|
PDPatternResources() |
Default constructor.
|
PDPatternResources(COSDictionary resourceDictionary) |
Prepopulated pattern resources.
|
Modifier and Type | Method | Description |
---|---|---|
static PDPatternResources |
create(COSDictionary resourceDictionary) |
Create the correct PD Model pattern based on the COS base pattern.
|
COSDictionary |
getCOSDictionary() |
This will get the underlying dictionary.
|
COSBase |
getCOSObject() |
Convert this standard java object to a COS object.
|
java.lang.String |
getFilter() |
Get the name of the filter.
|
int |
getLength() |
This will return the length of the content stream.
|
abstract java.awt.Paint |
getPaint(int pageHeight) |
This will return the paint of the pattern.
|
abstract int |
getPatternType() |
This will return the pattern type.
|
java.lang.String |
getType() |
This will return the paint type.
|
void |
setFilter(java.lang.String filter) |
Sets the filter entry of the encryption dictionary.
|
void |
setLength(int length) |
This will set the length of the content stream.
|
void |
setPaintType(int paintType) |
This will set the paint type.
|
void |
setPatternType(int patternType) |
This will set the pattern type.
|
public static final int TILING_PATTERN
public static final int SHADING_PATTERN
public PDPatternResources()
public PDPatternResources(COSDictionary resourceDictionary)
resourceDictionary
- The COSDictionary for this pattern resource.public COSDictionary getCOSDictionary()
public COSBase getCOSObject()
getCOSObject
in interface COSObjectable
public void setFilter(java.lang.String filter)
filter
- The filter name.public java.lang.String getFilter()
public void setLength(int length)
length
- The new stream length.public int getLength()
public void setPaintType(int paintType)
paintType
- The new paint type.public java.lang.String getType()
public void setPatternType(int patternType)
patternType
- The new pattern type.public abstract int getPatternType()
public static PDPatternResources create(COSDictionary resourceDictionary) throws java.io.IOException
resourceDictionary
- the COS pattern dictionaryjava.io.IOException
- If we are unable to create the PDPattern object.public abstract java.awt.Paint getPaint(int pageHeight) throws java.io.IOException
pageHeight
- the height of the current pagejava.io.IOException