com.sun.pdfview.pattern

Class PDFPattern

public abstract class PDFPattern extends Object

The abstract superclass of all PDF Pattern types
Constructor Summary
protected PDFPattern(int type)
Creates a new instance of PDFPattern
Method Summary
abstract PDFPaintgetPaint(PDFPaint basePaint)
Returns paint that represents the selected pattern
static PDFPatterngetPattern(PDFObject patternObj, Map resources)
Read a pattern from the given pattern stream
intgetPatternType()
Get the type of this pattern
AffineTransformgetTransform()
Get the transform associated with this pattern
protected abstract voidparse(PDFObject patternObj, Map resources)
Parse the pattern-specific information from the pdf object
protected voidsetTransform(AffineTransform xform)
Set the transform associated with this pattern

Constructor Detail

PDFPattern

protected PDFPattern(int type)
Creates a new instance of PDFPattern

Method Detail

getPaint

public abstract PDFPaint getPaint(PDFPaint basePaint)
Returns paint that represents the selected pattern

Parameters: basePaint the background paint color, or null for none

getPattern

public static PDFPattern getPattern(PDFObject patternObj, Map resources)
Read a pattern from the given pattern stream

getPatternType

public int getPatternType()
Get the type of this pattern

getTransform

public AffineTransform getTransform()
Get the transform associated with this pattern

parse

protected abstract void parse(PDFObject patternObj, Map resources)
Parse the pattern-specific information from the pdf object

Parameters: patternObj the pdfobject with data for this pattern

setTransform

protected void setTransform(AffineTransform xform)
Set the transform associated with this pattern