Package org.openpdf.renderer.pattern
Class PDFPattern
java.lang.Object
org.openpdf.renderer.pattern.PDFPattern
- Direct Known Subclasses:
PatternType1,PatternType2
The abstract superclass of all PDF Pattern types
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intthe pattern type (1 or 2)private AffineTransformthe matrix to transform from pattern space to PDF space -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPDFPattern(int type) Creates a new instance of PDFPattern -
Method Summary
Modifier and TypeMethodDescriptionabstract PDFPaintReturns paint that represents the selected patternstatic PDFPatterngetPattern(PDFObject patternObj, Map resources) Read a pattern from the given pattern streamintGet the type of this patternGet the transform associated with this patternprotected abstract voidParse the pattern-specific information from the pdf objectprotected voidsetTransform(AffineTransform xform) Set the transform associated with this pattern
-
Field Details
-
type
private int typethe pattern type (1 or 2) -
xform
the matrix to transform from pattern space to PDF space
-
-
Constructor Details
-
PDFPattern
protected PDFPattern(int type) Creates a new instance of PDFPattern
-
-
Method Details
-
getPattern
Read a pattern from the given pattern stream- Throws:
IOException
-
getPatternType
public int getPatternType()Get the type of this pattern -
getTransform
Get the transform associated with this pattern -
setTransform
Set the transform associated with this pattern -
parse
Parse the pattern-specific information from the pdf object- Parameters:
patternObj- the pdfobject with data for this pattern- Throws:
IOException
-
getPaint
Returns paint that represents the selected pattern- Parameters:
basePaint- the background paint color, or null for none
-