Package org.apache.batik.gvt
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: StrokeShapePainter.java 1733416 2016-03-03 07:07:13Z gadams $
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStrokeShapePainter
(Shape shape) Constructs a newShapePainter
that 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.boolean
inPaintedArea
(Point2D pt) Returns the bounds of the area covered by this shape painterboolean
Returns the bounds of the area covered by this shape painter (even if not painted).void
paint
(Graphics2D g2d) Paints the outline of 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.void
Sets 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 newShapePainter
that 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:
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 the bounds of the area covered 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 painter (even if not painted).- Specified by:
getSensitiveBounds2D
in interfaceShapePainter
-
inSensitiveArea
Returns the bounds of the area covered by this shape painter (even if not painted).- 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.
-