org.apache.batik.gvt

Class PatternPaint

public class PatternPaint extends Object implements Paint

The PatternPaint class provides a way to fill a Shape with a a pattern defined as a GVT Tree.
Constructor Summary
PatternPaint(GraphicsNode node, Rectangle2D patternRegion, boolean overflow, AffineTransform patternTransform)
Constructs a new PatternPaint.
Method Summary
PaintContextcreateContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Creates and returns a context used to generate the pattern.
GraphicsNodegetGraphicsNode()
Returns the graphics node that define the pattern.
booleangetOverflow()
Rectangle2DgetPatternRect()
Returns the pattern region.
AffineTransformgetPatternTransform()
Returns the additional transform of the pattern paint.
intgetTransparency()
Returns the transparency mode for this pattern paint.

Constructor Detail

PatternPaint

public PatternPaint(GraphicsNode node, Rectangle2D patternRegion, boolean overflow, AffineTransform patternTransform)
Constructs a new PatternPaint.

Parameters: node Used to generate the paint pixel pattern patternRegion Region to which this paint is constrained overflow 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 Detail

createContext

public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
Creates and returns a context used to generate the pattern.

getGraphicsNode

public GraphicsNode getGraphicsNode()
Returns the graphics node that define the pattern.

getOverflow

public boolean getOverflow()

getPatternRect

public Rectangle2D getPatternRect()
Returns the pattern region.

getPatternTransform

public AffineTransform getPatternTransform()
Returns the additional transform of the pattern paint.

getTransparency

public int getTransparency()
Returns the transparency mode for this pattern paint.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.