Package org.apache.batik.gvt
Class PatternPaint
java.lang.Object
org.apache.batik.gvt.PatternPaint
- All Implemented Interfaces:
Paint
,Transparency
The PatternPaint class provides a way to fill a Shape with a a pattern
defined as a GVT Tree.
-
Field Summary
Fields inherited from interface java.awt.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.boolean
Returns the pattern region.Returns the additional transform of the pattern paint.int
Returns the transparency mode for this pattern paint.
-
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:
createContext
in interfacePaint
-
getTransparency
public int getTransparency()Returns the transparency mode for this pattern paint.- Specified by:
getTransparency
in interfaceTransparency
-