public class PaintedPath extends AbstractPaintedGraphic
shape, stroke, strokePaint
Constructor and Description |
---|
PaintedPath(Shape s)
Create a painted path on the given Shape.
|
PaintedPath(Shape s,
float lineWidth)
Create a painted path on the given Shape with a given
line width.
|
PaintedPath(Shape s,
float lineWidth,
Paint paint)
Create a painted path on the given Shape with a given
line width and stroke color.
|
Modifier and Type | Method and Description |
---|---|
float[] |
getDashArray()
Get the dash array.
|
float |
getLineWidth()
Get the line width.
|
boolean |
hit(Rectangle2D r)
Test if this shape is hit by the given rectangle.
|
boolean |
intersects(Rectangle2D r)
Test if this shape intersects the given rectangle.
|
void |
paint(Graphics2D g)
Paint the shape.
|
void |
setDashArray(float[] dashArray)
Set the dash array of the stroke.
|
void |
setLineWidth(float lineWidth)
Set the line width.
|
void |
setStroke(Stroke s)
Set the stroke
|
getBounds, getStroke, getStroke, getStroke
public PaintedPath(Shape s)
public PaintedPath(Shape s, float lineWidth)
public float[] getDashArray()
public float getLineWidth()
getLineWidth
in interface PaintedGraphic
getLineWidth
in class AbstractPaintedGraphic
public boolean hit(Rectangle2D r)
hit
in interface PaintedGraphic
hit
in class AbstractPaintedGraphic
public boolean intersects(Rectangle2D r)
public void paint(Graphics2D g)
public void setDashArray(float[] dashArray)
public void setLineWidth(float lineWidth)
setLineWidth
in interface PaintedGraphic
setLineWidth
in class AbstractPaintedGraphic
public void setStroke(Stroke s)
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.