public class PaintedShape extends AbstractPaintedGraphic
Modifier and Type | Field and Description |
---|---|
java.awt.Paint |
fillPaint
The paint for the fill.
|
shape, stroke, strokePaint
Constructor and Description |
---|
PaintedShape(java.awt.Shape shape)
Create a painted shape on the given Shape.
|
PaintedShape(java.awt.Shape shape,
float lineWidth)
Create a painted shape on the given Shape.
|
PaintedShape(java.awt.Shape shape,
float lineWidth,
java.awt.Paint strokePaint)
Create a painted shape on the given Shape.
|
PaintedShape(java.awt.Shape shape,
java.awt.Paint fillPaint)
Create a painted shape on the given Shape.
|
PaintedShape(java.awt.Shape shape,
java.awt.Paint fillPaint,
float lineWidth)
Create a painted shape on the given Shape.
|
PaintedShape(java.awt.Shape shape,
java.awt.Paint fillPaint,
float lineWidth,
java.awt.Paint strokePaint)
Create a painted shape on the given Shape.
|
Modifier and Type | Method and Description |
---|---|
float |
getLineWidth()
Get the line width
|
boolean |
hit(java.awt.geom.Rectangle2D r)
Test if this shape is hit by the given rectangle.
|
boolean |
intersects(java.awt.geom.Rectangle2D r)
Test if this shape intersects the given rectangle.
|
void |
paint(java.awt.Graphics2D g)
Paint the shape.
|
void |
setFillPaint(java.awt.Paint fillPaint)
Set the fill paint for this shape (its fill if it is closed).
|
void |
setLineWidth(float lineWidth)
Set the line width.
|
void |
setStrokePaint(java.awt.Paint strokePaint)
Set the stroke paint for this shape (its outline if it is closed).
|
getBounds, getStroke, getStroke, getStroke
public PaintedShape(java.awt.Shape shape)
public PaintedShape(java.awt.Shape shape, java.awt.Paint fillPaint)
public PaintedShape(java.awt.Shape shape, float lineWidth)
public PaintedShape(java.awt.Shape shape, java.awt.Paint fillPaint, float lineWidth)
public PaintedShape(java.awt.Shape shape, float lineWidth, java.awt.Paint strokePaint)
public PaintedShape(java.awt.Shape shape, java.awt.Paint fillPaint, float lineWidth, java.awt.Paint strokePaint)
public float getLineWidth()
getLineWidth
in interface PaintedGraphic
getLineWidth
in class AbstractPaintedGraphic
public boolean hit(java.awt.geom.Rectangle2D r)
hit
in interface PaintedGraphic
hit
in class AbstractPaintedGraphic
public boolean intersects(java.awt.geom.Rectangle2D r)
public void paint(java.awt.Graphics2D g)
public void setLineWidth(float lineWidth)
setLineWidth
in interface PaintedGraphic
setLineWidth
in class AbstractPaintedGraphic
public void setStrokePaint(java.awt.Paint strokePaint)
public void setFillPaint(java.awt.Paint fillPaint)