Package org.apache.batik.gvt
Interface ShapePainter
-
- All Known Implementing Classes:
CompositeShapePainter,FillShapePainter,MarkerShapePainter,StrokeShapePainter
public interface ShapePainterRenders the shape of aShapeNode.- Version:
- $Id: ShapePainter.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.awt.ShapegetPaintedArea()Returns the area painted by this shape painter.java.awt.geom.Rectangle2DgetPaintedBounds2D()Returns the bounds of the area painted by this shape painterjava.awt.ShapegetSensitiveArea()Returns the area covered by this shape painter (even if nothing is painted there).java.awt.geom.Rectangle2DgetSensitiveBounds2D()Returns the bounds of the area covered by this shape painter (even if nothing is painted there).java.awt.ShapegetShape()Gets the shape this shape painter is associated with.booleaninPaintedArea(java.awt.geom.Point2D pt)Returns true ifptis in the painted area.booleaninSensitiveArea(java.awt.geom.Point2D pt)Returns true ifptis in the sensitive area.voidpaint(java.awt.Graphics2D g2d)Paints the specified shape using the specified Graphics2D.voidsetShape(java.awt.Shape shape)Sets the Shape this shape painter is associated with.
-
-
-
Method Detail
-
paint
void paint(java.awt.Graphics2D g2d)
Paints the specified shape using the specified Graphics2D.- Parameters:
g2d- the Graphics2D to use
-
getPaintedArea
java.awt.Shape getPaintedArea()
Returns the area painted by this shape painter.
-
getPaintedBounds2D
java.awt.geom.Rectangle2D getPaintedBounds2D()
Returns the bounds of the area painted by this shape painter
-
inPaintedArea
boolean inPaintedArea(java.awt.geom.Point2D pt)
Returns true ifptis in the painted area.
-
getSensitiveArea
java.awt.Shape getSensitiveArea()
Returns the area covered by this shape painter (even if nothing is painted there).
-
getSensitiveBounds2D
java.awt.geom.Rectangle2D getSensitiveBounds2D()
Returns the bounds of the area covered by this shape painter (even if nothing is painted there).
-
inSensitiveArea
boolean inSensitiveArea(java.awt.geom.Point2D pt)
Returns true ifptis in the sensitive area.
-
setShape
void setShape(java.awt.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.
-
getShape
java.awt.Shape getShape()
Gets the shape this shape painter is associated with.- Returns:
- shape associated with this painter
-
-