Class PDFPattern
java.lang.Object
org.loboevolution.pdfview.pattern.PDFPattern
- Direct Known Subclasses:
PatternType1,PatternType2
The abstract superclass of all PDF Pattern types
-
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
-
Constructor Details
-
PDFPattern
protected PDFPattern(int type) Creates a new instance of PDFPattern- Parameters:
type- aIntegerobject.
-
-
Method Details
-
getPattern
Read a pattern from the given pattern stream- Parameters:
patternObj- aPDFObjectobject.resources- aMapobject.- Returns:
- a
PDFPatternobject. - Throws:
IOException- if any.
-
getPatternType
public int getPatternType()Get the type of this pattern- Returns:
- a
Integerobject.
-
getTransform
Get the transform associated with this pattern- Returns:
- a
AffineTransformobject.
-
setTransform
Set the transform associated with this pattern- Parameters:
xform- aAffineTransformobject.
-
parse
Parse the pattern-specific information from the pdf object- Parameters:
patternObj- the pdfobject with data for this patternresources- aMapobject.- Throws:
IOException- if any.
-
getPaint
Returns paint that represents the selected pattern- Parameters:
basePaint- the background paint color, or null for none- Returns:
- a
PDFPaintobject.
-