Polygon2D.Double, Polygon2D.Float
Modifier and Type | Field and Description |
---|---|
(package private) float[] |
_coords
The coordinates
|
_closed, _coordCount
Constructor and Description |
---|
Float()
Create a new polygon with no vertices.
|
Float(float[] coords)
Create a new polygon with space for the
given number of vertices.
|
Float(float x,
float y)
Create a new polygon with a single start point
|
Float(int size)
Create a new polygon with space for the
given number of vertices.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getBounds2D()
Get the floating-point bounds of the polygon.
|
double |
getX(int index)
Get the given X-coordinate
|
double |
getY(int index)
Get the given Y-coordinate
|
void |
lineTo(double x,
double y)
Add a new vertex to the end of the line.
|
void |
moveTo(double x,
double y)
Move the start point of the vertex to the given position.
|
void |
setX(int index,
double x)
Set the given X-coordinate.
|
void |
setY(int index,
double y)
Set the given Y-coordinate
|
void |
transform(java.awt.geom.AffineTransform at)
Transform the polygon with the given transform.
|
void |
translate(double x,
double y)
Translate the polygon the given distance.
|
closePath, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, getVertexCount, intersects, intersects, reset, toString
public Float(int size)
public Float(float[] coords)
public Float()
public Float(float x, float y)
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
getBounds2D
in class Polygon2D
public double getX(int index)
public double getY(int index)
public void lineTo(double x, double y)
public void moveTo(double x, double y)
public void setX(int index, double x)
public void setY(int index, double y)
public void transform(java.awt.geom.AffineTransform at)