Package com.sun.pdfview.pattern
Class PatternType1
- java.lang.Object
-
- com.sun.pdfview.pattern.PDFPattern
-
- com.sun.pdfview.pattern.PatternType1
-
public class PatternType1 extends PDFPattern
A type 1 (tiling) pattern
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classPatternType1.TilingPatternPaintThis class overrides PDFPaint to paint in the pattern coordinate space(package private) classPatternType1.Type1PaintContextA simple paint context that uses an existing raster in device space to generate pixels
-
Field Summary
Fields Modifier and Type Field Description private java.awt.geom.Rectangle2Dbboxthe bounding box of the tile, in tile spaceprivate byte[]datathe stream datastatic intPAINT_COLOREDpaint typesstatic intPAINT_UNCOLOREDprivate intpaintTypethe paint type (colored or uncolored)private java.util.HashMap<java.lang.String,PDFObject>resourcesthe resources used by the image we will tilestatic intTILE_CONSTANTtiling typesstatic intTILE_FASTERstatic intTILE_NODISTORTprivate inttilingTypethe tiling type (constant, no distort or faster)private intxStepthe horiztonal tile spacing, in tile spaceprivate intyStepthe vertical spacing, in tile space
-
Constructor Summary
Constructors Constructor Description PatternType1()Creates a new instance of PatternType1
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Rectangle2DgetBBox()get the bounding boxPDFPaintgetPaint(PDFPaint basePaint)Create a PDFPaint from this pattern and set of components.intgetPaintType()get the paint typejava.util.HashMap<java.lang.String,PDFObject>getResources()get the associated resourcesintgetTilingType()get the tiling typeintgetXStep()get the x stepintgetYStep()get the y stepprotected voidparse(PDFObject patternObj, java.util.Map rsrc)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 Detail
-
PAINT_COLORED
public static final int PAINT_COLORED
paint types- See Also:
- Constant Field Values
-
PAINT_UNCOLORED
public static final int PAINT_UNCOLORED
- See Also:
- Constant Field Values
-
TILE_CONSTANT
public static final int TILE_CONSTANT
tiling types- See Also:
- Constant Field Values
-
TILE_NODISTORT
public static final int TILE_NODISTORT
- See Also:
- Constant Field Values
-
TILE_FASTER
public static final int TILE_FASTER
- See Also:
- Constant Field Values
-
resources
private java.util.HashMap<java.lang.String,PDFObject> resources
the resources used by the image we will tile
-
paintType
private int paintType
the paint type (colored or uncolored)
-
tilingType
private int tilingType
the tiling type (constant, no distort or faster)
-
bbox
private java.awt.geom.Rectangle2D bbox
the bounding box of the tile, in tile space
-
xStep
private int xStep
the horiztonal tile spacing, in tile space
-
yStep
private int yStep
the vertical spacing, in tile space
-
data
private byte[] data
the stream data
-
-
Method Detail
-
parse
protected void parse(PDFObject patternObj, java.util.Map rsrc) throws java.io.IOException
Parse the pattern from the PDFObject Note the resources passed in are ignored...- Specified by:
parsein classPDFPattern- Parameters:
patternObj- the pdfobject with data for this pattern- Throws:
java.io.IOException
-
getPaint
public PDFPaint getPaint(PDFPaint basePaint)
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:
getPaintin classPDFPattern- Parameters:
basePaint- the base paint to use, or null if not needed
-
getResources
public java.util.HashMap<java.lang.String,PDFObject> getResources()
get the associated resources
-
getPaintType
public int getPaintType()
get the paint type
-
getTilingType
public int getTilingType()
get the tiling type
-
getBBox
public java.awt.geom.Rectangle2D getBBox()
get the bounding box
-
getXStep
public int getXStep()
get the x step
-
getYStep
public int getYStep()
get the y step
-
-