|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Polygon
ilog.util.IlIntPolygon
public class IlIntPolygon
This class describes a polygon where all the corners have integer coordinates.
| Field Summary | |
|---|---|
static int |
EvenOddRule
Mode for filling polygons: If the winding number of an area is even, this area is filled. |
static int |
WindingRule
Mode for filling polygons: If the winding number of an area is nonzero, this area is filled. |
| Fields inherited from class java.awt.Polygon |
|---|
bounds, npoints, xpoints, ypoints |
| Constructor Summary | |
|---|---|
IlIntPolygon(int[] xpoints,
int[] ypoints,
int npoints)
Creates a polygon. |
|
IlIntPolygon(int[] xpoints,
int[] ypoints,
int npoints,
int fillRule)
Deprecated. Use the three-argument constructor. The only supported fillRule is EvenOddRule. |
|
| Method Summary | |
|---|---|
Polygon |
getFillingPolygon()
Returns a polygon which, when filled according to EvenOddRule, represents (approximately) this polygon. |
protected int |
getFillRule()
Returns the mode for filling this polygon. |
Enumeration |
horizontalLineIntersection(int y)
Intersects this polygon with a given horizontal line, and returns an enumeration of the intervals belonging to the polygon. |
protected void |
setFillRule(int r)
Sets the mode for filling this polygon. |
String |
toString()
Returns the String representation of this IlIntPolygon's values. |
| Methods inherited from class java.awt.Polygon |
|---|
addPoint, contains, contains, contains, contains, contains, contains, getBoundingBox, getBounds, getBounds2D, getPathIterator, getPathIterator, inside, intersects, intersects, invalidate, reset, translate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int EvenOddRule
public static final int WindingRule
| Constructor Detail |
|---|
public IlIntPolygon(int[] xpoints,
int[] ypoints,
int npoints)
Note: The implementation may remove redundant points.
xpoints - the array of x coordinatesypoints - the array of y coordinatesnpoints - the total number of points in the polygon
public IlIntPolygon(int[] xpoints,
int[] ypoints,
int npoints,
int fillRule)
fillRule is EvenOddRule.
Note: The implementation may remove redundant points.
xpoints - the array of x coordinatesypoints - the array of y coordinatesnpoints - the total number of points in the polygonfillRule - the filling mode of this polygon (EvenOddRule)| Method Detail |
|---|
protected int getFillRule()
protected void setFillRule(int r)
r - public Polygon getFillingPolygon()
public Enumeration horizontalLineIntersection(int y)
y - the y coordinate of the horizontal line
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||