public class PathGeometry extends java.lang.Object implements Geometry
PathGeometry provides sites for the vertices of the path, and for the control point for those segments that are quadratic or cubic curves.
Modifier and Type | Class and Description |
---|---|
class |
PathGeometry.CloseSegment
CloseSegment is a special type of Vertex, that closes a sub-path.
|
class |
PathGeometry.Vertex
Vertex is the site that represents vertexes of the path.
|
Constructor and Description |
---|
PathGeometry(Figure figure,
java.awt.Shape shape)
Create a new geometry object on the given figure and with the
given initial shape.
|
Modifier and Type | Method and Description |
---|---|
Figure |
getFigure()
Get the figure to which this geometry object is attached.
|
java.awt.Shape |
getShape()
Get the shape that defines this geometry object.
|
Site |
getVertex(int number)
Get the site on the given vertex.
|
int |
getVertexCount()
Get the number of vertices of this shape.
|
void |
setShape(java.awt.Shape shape)
Set the shape that defines this geometry object.
|
void |
translate(double x,
double y)
Translate the geometry object
|
java.util.Iterator |
vertices()
Return an iteration over the vertices in this geometry object.
|
public PathGeometry(Figure figure, java.awt.Shape shape)
public Figure getFigure()
public java.awt.Shape getShape()
public Site getVertex(int number)
public int getVertexCount()
public void setShape(java.awt.Shape shape)
public void translate(double x, double y)
public java.util.Iterator vertices()