public class Polygon2D
extends java.awt.geom.RectangularShape
implements java.awt.Shape
Constructor and Description |
---|
Polygon2D() |
Polygon2D(double[] xPoints,
double[] yPoints) |
Polygon2D(int[] xPoints,
int[] yPoints) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double x,
double y) |
boolean |
contains(double x,
double y,
double w,
double h) |
java.awt.geom.Rectangle2D |
getBounds2D() |
double |
getHeight() |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at) |
double |
getWidth() |
double |
getX() |
double |
getY() |
boolean |
intersects(double x,
double y,
double w,
double h) |
boolean |
isEmpty() |
void |
setFrame(double x,
double y,
double w,
double h) |
void |
setPoints(double[] xPoints,
double[] yPoints) |
void |
setPoints(int[] xPoints,
int[] yPoints) |
void |
transform(java.awt.geom.AffineTransform a) |
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
public Polygon2D()
public Polygon2D(int[] xPoints, int[] yPoints)
public Polygon2D(double[] xPoints, double[] yPoints)
public void transform(java.awt.geom.AffineTransform a)
public void setPoints(double[] xPoints, double[] yPoints)
public void setPoints(int[] xPoints, int[] yPoints)
public double getHeight()
getHeight
in class java.awt.geom.RectangularShape
public double getWidth()
getWidth
in class java.awt.geom.RectangularShape
public double getX()
getX
in class java.awt.geom.RectangularShape
public double getY()
getY
in class java.awt.geom.RectangularShape
public boolean isEmpty()
isEmpty
in class java.awt.geom.RectangularShape
public void setFrame(double x, double y, double w, double h)
setFrame
in class java.awt.geom.RectangularShape
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
getPathIterator
in interface java.awt.Shape
public boolean contains(double x, double y)
contains
in interface java.awt.Shape
public boolean contains(double x, double y, double w, double h)
contains
in interface java.awt.Shape
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D
in interface java.awt.Shape
public boolean intersects(double x, double y, double w, double h)
intersects
in interface java.awt.Shape