Package org.apache.batik.gvt
Class FillShapePainter
java.lang.Object
org.apache.batik.gvt.FillShapePainter
- All Implemented Interfaces:
ShapePainter
A shape painter that can be used to fill a shape.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFillShapePainter
(Shape shape) Constructs a newFillShapePainter
that can be used to fill aShape
. -
Method Summary
Modifier and TypeMethodDescriptiongetPaint()
Gets the paint used to draw the outline of the shape.Returns the area painted by this shape painter.Returns the bounds of the area painted by this shape painterReturns the area covered by this shape painter (even if not painted).Returns the bounds of the area covered by this shape painte (even if not painted).getShape()
Gets the Shape this shape painter is associated with.boolean
inPaintedArea
(Point2D pt) Returns true if pt is in the area painted by this shape painterboolean
Returns true if pt is in the area painted by this shape paintervoid
paint
(Graphics2D g2d) Paints the specified shape using the specified Graphics2D.void
Sets the paint used to fill a shape.void
Sets the Shape this shape painter is associated with.
-
Field Details
-
shape
The Shape to be painted. -
paint
The paint attribute used to fill the shape.
-
-
Constructor Details
-
FillShapePainter
Constructs a newFillShapePainter
that can be used to fill aShape
.- Parameters:
shape
- Shape to be painted by this painter Should not be null.
-
-
Method Details
-
setPaint
Sets the paint used to fill a shape.- Parameters:
newPaint
- the paint object used to fill the shape
-
getPaint
Gets the paint used to draw the outline of the shape. -
paint
Paints the specified shape using the specified Graphics2D.- Specified by:
paint
in interfaceShapePainter
- Parameters:
g2d
- the Graphics2D to use
-
getPaintedArea
Returns the area painted by this shape painter.- Specified by:
getPaintedArea
in interfaceShapePainter
-
getPaintedBounds2D
Returns the bounds of the area painted by this shape painter- Specified by:
getPaintedBounds2D
in interfaceShapePainter
-
inPaintedArea
Returns true if pt is in the area painted by this shape painter- Specified by:
inPaintedArea
in interfaceShapePainter
-
getSensitiveArea
Returns the area covered by this shape painter (even if not painted).- Specified by:
getSensitiveArea
in interfaceShapePainter
-
getSensitiveBounds2D
Returns the bounds of the area covered by this shape painte (even if not painted).- Specified by:
getSensitiveBounds2D
in interfaceShapePainter
-
inSensitiveArea
Returns true if pt is in the area painted by this shape painter- Specified by:
inSensitiveArea
in interfaceShapePainter
-
setShape
Sets the Shape this shape painter is associated with.- Specified by:
setShape
in interfaceShapePainter
- Parameters:
shape
- new shape this painter should be associated with. Should not be null.
-
getShape
Gets the Shape this shape painter is associated with.- Specified by:
getShape
in interfaceShapePainter
- Returns:
- shape associated with this Painter.
-