public static class Polyline2D.Float extends Polyline2D
Polyline2D.Double, Polyline2D.Float_coordCount| Constructor and Description |
|---|
Float()
Create a new polyline with no vertices.
|
Float(float x1,
float y1,
float x2,
float y2)
Create a new polyline with two vertices.
|
Float(int initSize)
Create a new polyline with "initSize" number of vertices.
|
Float(Polyline2D in)
Copy constructor for efficient copying of Polyline2D.
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBounds2D()
Get the floating-point bounds of the polyline.
|
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(AffineTransform at)
Transform the polyline with the given transform.
|
void |
translate(double x,
double y)
Translate the polyline the given distance.
|
contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, getVertexCount, intersects, intersects, reset, toStringpublic Float()
public Float(int initSize)
public Float(Polyline2D in)
public Float(float x1,
float y1,
float x2,
float y2)
public Rectangle2D getBounds2D()
getBounds2D in interface ShapegetBounds2D in class Polyline2Dpublic double getX(int index)
getX in class Polyline2DIndexOutOfBoundsException - The index is out of bounds.public double getY(int index)
getY in class Polyline2DIndexOutOfBoundsException - The index is out of bounds.public void lineTo(double x,
double y)
lineTo in class Polyline2Dpublic void moveTo(double x,
double y)
moveTo in class Polyline2DUnsupportedOperationException - The polyline already
has verticespublic void setX(int index,
double x)
setX in class Polyline2DIndexOutOfBoundsException - The index is out of bounds.public void setY(int index,
double y)
setY in class Polyline2DIndexOutOfBoundsException - The index is out of bounds.public void transform(AffineTransform at)
transform in class Polyline2Dpublic void translate(double x,
double y)
translate in class Polyline2DCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.