org.apache.batik.gvt

Class FillShapePainter

public class FillShapePainter extends Object implements ShapePainter

A shape painter that can be used to fill a shape.
Field Summary
protected Paintpaint
The paint attribute used to fill the shape.
protected Shapeshape
The Shape to be painted.
Constructor Summary
FillShapePainter(Shape shape)
Constructs a new FillShapePainter that can be used to fill a Shape.
Method Summary
PaintgetPaint()
Gets the paint used to draw the outline of the shape.
ShapegetPaintedArea()
Returns the area painted by this shape painter.
Rectangle2DgetPaintedBounds2D()
Returns the bounds of the area painted by this shape painter
ShapegetSensitiveArea()
Returns the area covered by this shape painter (even if not painted).
Rectangle2DgetSensitiveBounds2D()
Returns the bounds of the area covered by this shape painte (even if not painted).
ShapegetShape()
Gets the Shape this shape painter is associated with.
booleaninPaintedArea(Point2D pt)
Returns true if pt is in the area painted by this shape painter
booleaninSensitiveArea(Point2D pt)
Returns true if pt is in the area painted by this shape painter
voidpaint(Graphics2D g2d)
Paints the specified shape using the specified Graphics2D.
voidsetPaint(Paint newPaint)
Sets the paint used to fill a shape.
voidsetShape(Shape shape)
Sets the Shape this shape painter is associated with.

Field Detail

paint

protected Paint paint
The paint attribute used to fill the shape.

shape

protected Shape shape
The Shape to be painted.

Constructor Detail

FillShapePainter

public FillShapePainter(Shape shape)
Constructs a new FillShapePainter that can be used to fill a Shape.

Parameters: shape Shape to be painted by this painter Should not be null.

Method Detail

getPaint

public Paint getPaint()
Gets the paint used to draw the outline of the shape.

getPaintedArea

public Shape getPaintedArea()
Returns the area painted by this shape painter.

getPaintedBounds2D

public Rectangle2D getPaintedBounds2D()
Returns the bounds of the area painted by this shape painter

getSensitiveArea

public Shape getSensitiveArea()
Returns the area covered by this shape painter (even if not painted).

getSensitiveBounds2D

public Rectangle2D getSensitiveBounds2D()
Returns the bounds of the area covered by this shape painte (even if not painted).

getShape

public Shape getShape()
Gets the Shape this shape painter is associated with.

Returns: shape associated with this Painter.

inPaintedArea

public boolean inPaintedArea(Point2D pt)
Returns true if pt is in the area painted by this shape painter

inSensitiveArea

public boolean inSensitiveArea(Point2D pt)
Returns true if pt is in the area painted by this shape painter

paint

public void paint(Graphics2D g2d)
Paints the specified shape using the specified Graphics2D.

Parameters: g2d the Graphics2D to use

setPaint

public void setPaint(Paint newPaint)
Sets the paint used to fill a shape.

Parameters: newPaint the paint object used to fill the shape

setShape

public void setShape(Shape shape)
Sets the Shape this shape painter is associated with.

Parameters: shape new shape this painter should be associated with. Should not be null.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.