Package com.sun.pdfview.pattern
Class PatternType1
java.lang.Object
com.sun.pdfview.pattern.PDFPattern
com.sun.pdfview.pattern.PatternType1
A type 1 (tiling) pattern
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class
This class overrides PDFPaint to paint in the pattern coordinate space(package private) class
A simple paint context that uses an existing raster in device space to generate pixels -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Rectangle2D
the bounding box of the tile, in tile spaceprivate byte[]
the stream datastatic final int
paint typesstatic final int
private int
the paint type (colored or uncolored)the resources used by the image we will tilestatic final int
tiling typesstatic final int
static final int
private int
the tiling type (constant, no distort or faster)private int
the horiztonal tile spacing, in tile spaceprivate int
the vertical spacing, in tile space -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBBox()
get the bounding boxCreate a PDFPaint from this pattern and set of components.int
get the paint typeget the associated resourcesint
get the tiling typeint
getXStep()
get the x stepint
getYStep()
get the y stepprotected void
Parse the pattern from the PDFObject Note the resources passed in are ignored...Methods inherited from class com.sun.pdfview.pattern.PDFPattern
getPattern, getPatternType, getTransform, setTransform
-
Field Details
-
PAINT_COLORED
public static final int PAINT_COLOREDpaint types- See Also:
-
PAINT_UNCOLORED
public static final int PAINT_UNCOLORED- See Also:
-
TILE_CONSTANT
public static final int TILE_CONSTANTtiling types- See Also:
-
TILE_NODISTORT
public static final int TILE_NODISTORT- See Also:
-
TILE_FASTER
public static final int TILE_FASTER- See Also:
-
resources
the resources used by the image we will tile -
paintType
private int paintTypethe paint type (colored or uncolored) -
tilingType
private int tilingTypethe tiling type (constant, no distort or faster) -
bbox
the bounding box of the tile, in tile space -
xStep
private int xStepthe horiztonal tile spacing, in tile space -
yStep
private int yStepthe vertical spacing, in tile space -
data
private byte[] datathe stream data
-
-
Constructor Details
-
PatternType1
public PatternType1()Creates a new instance of PatternType1
-
-
Method Details
-
parse
Parse the pattern from the PDFObject Note the resources passed in are ignored...- Specified by:
parse
in classPDFPattern
- Parameters:
patternObj
- the pdfobject with data for this pattern- Throws:
IOException
-
getPaint
Create a PDFPaint from this pattern and set of components. This creates a buffered image of this pattern using the given paint, then uses that image to create the correct TexturePaint to use in the PDFPaint.- Specified by:
getPaint
in classPDFPattern
- Parameters:
basePaint
- the base paint to use, or null if not needed
-
getResources
get the associated resources -
getPaintType
public int getPaintType()get the paint type -
getTilingType
public int getTilingType()get the tiling type -
getBBox
get the bounding box -
getXStep
public int getXStep()get the x step -
getYStep
public int getYStep()get the y step
-