Class PatternPaint
java.lang.Object
org.apache.batik.gvt.PatternPaint
- All Implemented Interfaces:
Paint, Transparency
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PatternPaintContextprivate GraphicsNodeTheGraphicsNodethat thisPaintuses to produce the pixel patternprivate booleanControls whether or not the pattern overflows the pattern tileprivate Rectangle2DThe region to which this paint is constrainedprivate AffineTransformAdditional pattern transform, added on top of the user space to device space transform (i.e., before the tiling spaceprivate FilterFields inherited from interface Transparency
BITMASK, OPAQUE, TRANSLUCENT -
Constructor Summary
ConstructorsConstructorDescriptionPatternPaint(GraphicsNode node, Rectangle2D patternRegion, boolean overflow, AffineTransform patternTransform) Constructs a newPatternPaint. -
Method Summary
Modifier and TypeMethodDescriptioncreateContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the pattern.Returns the graphics node that define the pattern.booleanReturns the pattern region.Returns the additional transform of the pattern paint.intReturns the transparency mode for this pattern paint.
-
Field Details
-
node
TheGraphicsNodethat thisPaintuses to produce the pixel pattern -
patternRegion
The region to which this paint is constrained -
patternTransform
Additional pattern transform, added on top of the user space to device space transform (i.e., before the tiling space -
tile
-
overflow
private boolean overflowControls whether or not the pattern overflows the pattern tile -
lastContext
-
-
Constructor Details
-
PatternPaint
public PatternPaint(GraphicsNode node, Rectangle2D patternRegion, boolean overflow, AffineTransform patternTransform) Constructs a newPatternPaint.- Parameters:
node- Used to generate the paint pixel patternpatternRegion- Region to which this paint is constrainedoverflow- controls whether or not the node can overflow the patternRegion.patternTransform- additional transform added on top of the user space to device space transform.
-
-
Method Details
-
getGraphicsNode
Returns the graphics node that define the pattern. -
getPatternRect
Returns the pattern region. -
getPatternTransform
Returns the additional transform of the pattern paint. -
getOverflow
public boolean getOverflow() -
createContext
public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) Creates and returns a context used to generate the pattern.- Specified by:
createContextin interfacePaint
-
getTransparency
public int getTransparency()Returns the transparency mode for this pattern paint.- Specified by:
getTransparencyin interfaceTransparency
-