Class StrokeShapePainter
java.lang.Object
org.apache.batik.gvt.StrokeShapePainter
- All Implemented Interfaces:
ShapePainter
A shape painter that can be used to draw the outline of a shape.
- Version:
- $Id$
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStrokeShapePainter(Shape shape) Constructs a newShapePainterthat can be used to draw the outline of 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 painter (even if not painted).getShape()Gets the Shape this shape painter is associated with.Gets the stroke used to draw the outline of the shape.booleaninPaintedArea(Point2D pt) Returns the bounds of the area covered by this shape painterbooleanReturns the bounds of the area covered by this shape painter (even if not painted).voidpaint(Graphics2D g2d) Paints the outline of the specified shape using the specified Graphics2D.voidSets the paint used to fill a shape.voidSets the Shape this shape painter is associated with.voidSets the stroke used to draw the outline of a shape.
-
Field Details
-
shape
Shape painted by this painter. -
strokedShape
Stroked version of the shape. -
stroke
The stroke attribute used to draw the outline of the shape. -
paint
The paint attribute used to draw the outline of the shape.
-
-
Constructor Details
-
StrokeShapePainter
Constructs a newShapePainterthat can be used to draw the outline of aShape.- Parameters:
shape- shape to be painted by this painter. Should not be null.
-
-
Method Details
-
setStroke
Sets the stroke used to draw the outline of a shape.- Parameters:
newStroke- the stroke object used to draw the outline of the shape
-
getStroke
Gets the stroke used to draw the outline of the shape. -
setPaint
Sets the paint used to fill a shape.- Parameters:
newPaint- the paint object used to draw the shape
-
getPaint
Gets the paint used to draw the outline of the shape. -
paint
Paints the outline of the specified shape using the specified Graphics2D.- Specified by:
paintin interfaceShapePainter- Parameters:
g2d- the Graphics2D to use
-
getPaintedArea
Returns the area painted by this shape painter.- Specified by:
getPaintedAreain interfaceShapePainter
-
getPaintedBounds2D
Returns the bounds of the area painted by this shape painter- Specified by:
getPaintedBounds2Din interfaceShapePainter
-
inPaintedArea
Returns the bounds of the area covered by this shape painter- Specified by:
inPaintedAreain interfaceShapePainter
-
getSensitiveArea
Returns the area covered by this shape painter (even if not painted).- Specified by:
getSensitiveAreain interfaceShapePainter
-
getSensitiveBounds2D
Returns the bounds of the area covered by this shape painter (even if not painted).- Specified by:
getSensitiveBounds2Din interfaceShapePainter
-
inSensitiveArea
Returns the bounds of the area covered by this shape painter (even if not painted).- Specified by:
inSensitiveAreain interfaceShapePainter
-
setShape
Sets the Shape this shape painter is associated with.- Specified by:
setShapein 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:
getShapein interfaceShapePainter- Returns:
- shape associated with this painter.
-