public class PathFigure extends AbstractFigure implements ShapedFigure
| Constructor and Description |
|---|
PathFigure(Shape shape)
Create a new figure with the given shape.
|
PathFigure(Shape shape,
float lineWidth)
Create a new figure with the given shape and width.
|
PathFigure(Shape shape,
Paint paint,
float lineWidth)
Create a new figure with the given paint and width.
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBounds()
Get the bounding box of this figure.
|
Composite |
getComposite()
Get the compositing operator
|
float[] |
getDashArray()
Get the dash array.
|
float |
getLineWidth()
Get the line width of this figure.
|
Shape |
getShape()
Get the shape of this figure.
|
Stroke |
getStroke()
Get the stroke of this figure.
|
Paint |
getStrokePaint()
Get the stroke paint of this figure.
|
boolean |
hit(Rectangle2D r)
Test if this figure intersects the given rectangle.
|
void |
paint(Graphics2D g)
Paint the figure.
|
void |
setComposite(AlphaComposite c)
Set the compositing operation for this figure.
|
void |
setDashArray(float[] dashArray)
Set the dash array of the stroke.
|
void |
setLineWidth(float lineWidth)
Set the line width.
|
void |
setShape(Shape s)
Set the shape of this figure.
|
void |
setStroke(BasicStroke s)
Set the stroke of this figure.
|
void |
setStrokePaint(Paint p)
Set the stroke paint of this figure.
|
void |
transform(AffineTransform at)
Transform the figure with the supplied transform.
|
void |
translate(double x,
double y)
Translate the figure with by the given distance.
|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, intersects, setInteractor, setParent, setToolTipTextisVisible, paint, setVisiblegetTransformContext, repaint, repaintgetUserObject, setUserObjectpublic PathFigure(Shape shape)
public PathFigure(Shape shape, float lineWidth)
public Rectangle2D getBounds()
getBounds in interface FiguregetBounds in class AbstractFigurepublic float[] getDashArray()
public float getLineWidth()
public Shape getShape()
getShape in interface FiguregetShape in class AbstractFigurepublic Stroke getStroke()
public Paint getStrokePaint()
public Composite getComposite()
public boolean hit(Rectangle2D r)
hit in interface Figurehit in class AbstractFigurepublic void paint(Graphics2D g)
paint in interface VisibleComponentpaint in class AbstractFigurepublic void setDashArray(float[] dashArray)
public void setLineWidth(float lineWidth)
public void setShape(Shape s)
setShape in interface ShapedFigurepublic void setStroke(BasicStroke s)
public void setStrokePaint(Paint p)
public void setComposite(AlphaComposite c)
public void transform(AffineTransform at)
transform in interface Figuretransform in class AbstractFigurepublic void translate(double x,
double y)
translate in interface Figuretranslate in class AbstractFigureCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.