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
ModifierConstructorDescriptionprotected
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
-
Constructor Details
-
PDFPattern
protected PDFPattern(int type) Creates a new instance of PDFPattern- Parameters:
type
- aInteger
object.
-
-
Method Details
-
getPattern
Read a pattern from the given pattern stream- Parameters:
patternObj
- aPDFObject
object.resources
- aMap
object.- Returns:
- a
PDFPattern
object. - Throws:
IOException
- if any.
-
getPatternType
public int getPatternType()Get the type of this pattern- Returns:
- a
Integer
object.
-
getTransform
Get the transform associated with this pattern- Returns:
- a
AffineTransform
object.
-
setTransform
Set the transform associated with this pattern- Parameters:
xform
- aAffineTransform
object.
-
parse
Parse the pattern-specific information from the pdf object- Parameters:
patternObj
- the pdfobject with data for this patternresources
- aMap
object.- Throws:
IOException
- if any.
-
getPaint
Returns paint that represents the selected pattern- Parameters:
basePaint
- the background paint color, or null for none- Returns:
- a
PDFPaint
object.
-