Package org.apache.batik.gvt
Class FillShapePainter
- java.lang.Object
-
- org.apache.batik.gvt.FillShapePainter
-
- All Implemented Interfaces:
ShapePainter
public class FillShapePainter extends java.lang.Object implements ShapePainter
A shape painter that can be used to fill a shape.- Version:
- $Id: FillShapePainter.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Constructor Summary
Constructors Constructor Description FillShapePainter(java.awt.Shape shape)
Constructs a newFillShapePainter
that can be used to fill aShape
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Paint
getPaint()
Gets the paint used to draw the outline of the shape.java.awt.Shape
getPaintedArea()
Returns the area painted by this shape painter.java.awt.geom.Rectangle2D
getPaintedBounds2D()
Returns the bounds of the area painted by this shape painterjava.awt.Shape
getSensitiveArea()
Returns the area covered by this shape painter (even if not painted).java.awt.geom.Rectangle2D
getSensitiveBounds2D()
Returns the bounds of the area covered by this shape painte (even if not painted).java.awt.Shape
getShape()
Gets the Shape this shape painter is associated with.boolean
inPaintedArea(java.awt.geom.Point2D pt)
Returns true if pt is in the area painted by this shape painterboolean
inSensitiveArea(java.awt.geom.Point2D pt)
Returns true if pt is in the area painted by this shape paintervoid
paint(java.awt.Graphics2D g2d)
Paints the specified shape using the specified Graphics2D.void
setPaint(java.awt.Paint newPaint)
Sets the paint used to fill a shape.void
setShape(java.awt.Shape shape)
Sets the Shape this shape painter is associated with.
-
-
-
Method Detail
-
setPaint
public void setPaint(java.awt.Paint newPaint)
Sets the paint used to fill a shape.- Parameters:
newPaint
- the paint object used to fill the shape
-
getPaint
public java.awt.Paint getPaint()
Gets the paint used to draw the outline of the shape.
-
paint
public void paint(java.awt.Graphics2D g2d)
Paints the specified shape using the specified Graphics2D.- Specified by:
paint
in interfaceShapePainter
- Parameters:
g2d
- the Graphics2D to use
-
getPaintedArea
public java.awt.Shape getPaintedArea()
Returns the area painted by this shape painter.- Specified by:
getPaintedArea
in interfaceShapePainter
-
getPaintedBounds2D
public java.awt.geom.Rectangle2D getPaintedBounds2D()
Returns the bounds of the area painted by this shape painter- Specified by:
getPaintedBounds2D
in interfaceShapePainter
-
inPaintedArea
public boolean inPaintedArea(java.awt.geom.Point2D pt)
Returns true if pt is in the area painted by this shape painter- Specified by:
inPaintedArea
in interfaceShapePainter
-
getSensitiveArea
public java.awt.Shape getSensitiveArea()
Returns the area covered by this shape painter (even if not painted).- Specified by:
getSensitiveArea
in interfaceShapePainter
-
getSensitiveBounds2D
public java.awt.geom.Rectangle2D getSensitiveBounds2D()
Returns the bounds of the area covered by this shape painte (even if not painted).- Specified by:
getSensitiveBounds2D
in interfaceShapePainter
-
inSensitiveArea
public boolean inSensitiveArea(java.awt.geom.Point2D pt)
Returns true if pt is in the area painted by this shape painter- Specified by:
inSensitiveArea
in interfaceShapePainter
-
setShape
public void setShape(java.awt.Shape shape)
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
public java.awt.Shape getShape()
Gets the Shape this shape painter is associated with.- Specified by:
getShape
in interfaceShapePainter
- Returns:
- shape associated with this Painter.
-
-