Package com.sun.pdfview.pattern
Class PDFPattern
java.lang.Object
com.sun.pdfview.pattern.PDFPattern
- Direct Known Subclasses:
PatternType1
The abstract superclass of all PDF Pattern types
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
the pattern type (1 or 2)private AffineTransform
the matrix to transform from pattern space to PDF space -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PDFPattern
(int type) Creates a new instance of PDFPattern -
Method Summary
Modifier and TypeMethodDescriptionabstract PDFPaint
Returns paint that represents the selected patternstatic PDFPattern
getPattern
(PDFObject patternObj, Map resources) Read a pattern from the given pattern streamint
Get the type of this patternGet the transform associated with this patternprotected abstract void
Parse the pattern-specific information from the pdf objectprotected void
setTransform
(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
-