public class FloatPolygon extends Object
Modifier and Type | Field and Description |
---|---|
int |
npoints
The number of points.
|
float[] |
xpoints |
float[] |
ypoints |
Constructor and Description |
---|
FloatPolygon()
Constructs an empty FloatPolygon.
|
FloatPolygon(float[] xpoints,
float[] ypoints)
Constructs a FloatPolygon from x and y arrays.
|
FloatPolygon(float[] xpoints,
float[] ypoints,
int npoints)
Constructs a FloatPolygon from x and y arrays.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(double x,
double y) |
void |
addPoint(float x,
float y) |
boolean |
contains(float x,
float y)
Returns 'true' if the point (x,y) is inside this polygon.
|
FloatPolygon |
duplicate() |
Rectangle |
getBounds() |
Rectangle2D.Double |
getFloatBounds() |
double |
getLength(boolean isLine) |
public int npoints
public float[] xpoints
public float[] ypoints
public FloatPolygon()
public FloatPolygon(float[] xpoints, float[] ypoints)
public FloatPolygon(float[] xpoints, float[] ypoints, int npoints)
public boolean contains(float x, float y)
public Rectangle getBounds()
public Rectangle2D.Double getFloatBounds()
public void addPoint(float x, float y)
public void addPoint(double x, double y)
public FloatPolygon duplicate()
public double getLength(boolean isLine)