|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.Polygon
| Field Summary | |
protected Rect |
bounds
|
int |
numPoints
|
int[] |
xPoints
|
int[] |
yPoints
|
| Constructor Summary | |
Polygon(int[] xPoints,
int[] yPoints,
int numPoints)
|
|
Polygon(Polygon other,
int dx,
int dy)
Create a new Polygon which is a (possibly) translated version of the original. |
|
| Method Summary | |
void |
draw(Graphics g,
int x,
int y,
boolean fill)
Draw the polygon onto a Graphics object. |
Polygon |
getCopy()
|
Rect |
getRect(Rect dest)
Get the bounding rectangle of the area. |
boolean |
intersects(Area other)
See if this Area intersects another. |
boolean |
isIn(int x,
int y)
Check if the point is in the area. |
Image |
toImage()
Convert this Polygon to a black and white Image which fits exactly around the bounding Rect for the polygon. |
Mask |
toMask()
Convert this Polygon to a Mask which fits exactly around the bounding Rect for the polygon. |
Polygon |
translate(Polygon other,
int dx,
int dy)
Turn this polygon into a translation of the other polygon, by the specified dx and dy values. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Field Detail |
public int[] xPoints
public int[] yPoints
public int numPoints
protected Rect bounds
| Constructor Detail |
public Polygon(int[] xPoints,
int[] yPoints,
int numPoints)
public Polygon(Polygon other,
int dx,
int dy)
| Method Detail |
public Polygon getCopy()
public Rect getRect(Rect dest)
Area
getRect in interface Areadest - an optional destination Rect.
public boolean isIn(int x,
int y)
Area
isIn in interface Areapublic boolean intersects(Area other)
Area
intersects in interface Area
public Polygon translate(Polygon other,
int dx,
int dy)
other - The other polygon.dx - The x translation.dy - The y translation.
public void draw(Graphics g,
int x,
int y,
boolean fill)
public Image toImage()
public Mask toMask()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||