|
||||||||||
| 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
ilog.tgo.grprim.IltPolygon
public class IltPolygon
This class describes a polygon where all the corners have integer coordinates.
IltPolyline,
Serialized Form| Field Summary |
|---|
| Fields inherited from class ilog.util.IlIntPolygon |
|---|
EvenOddRule, WindingRule |
| Fields inherited from class java.awt.Polygon |
|---|
bounds, npoints, xpoints, ypoints |
| Constructor Summary | |
|---|---|
IltPolygon(int[] xpoints,
int[] ypoints,
int npoints)
Creates a polygon. |
|
IltPolygon(int[] xpoints,
int[] ypoints,
int npoints,
int fillRule)
Deprecated. Please use the three-argument constructor. The only supported fillRule is EvenOddRule anyway. |
|
| Method Summary | |
|---|---|
void |
addPoint(int x,
int y)
|
boolean |
contains(int x,
int y)
Determines whether a point is contained in the inside area of this polygon. |
boolean |
containsInClosure(int x,
int y)
Determines whether a point is contained in this polygon (inside or on the border). |
boolean |
containsInInterior(int x,
int y)
Determines whether a point is contained in the inside area of this polygon. |
Polygon |
getFillingPolygon()
Returns a polygon which, when filled according to EvenOddRule, represents (approximately) 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. |
| Methods inherited from class ilog.util.IlIntPolygon |
|---|
getFillRule, setFillRule, toString |
| Methods inherited from class java.awt.Polygon |
|---|
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 |
| Constructor Detail |
|---|
public IltPolygon(int[] xpoints,
int[] ypoints,
int npoints,
int fillRule)
fillRule is EvenOddRule anyway.
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
public IltPolygon(int[] xpoints,
int[] ypoints,
int npoints)
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 polygon| Method Detail |
|---|
public boolean containsInInterior(int x,
int y)
x - the x coordinate of the point to be testedy - the y coordinate of the point to be tested
public boolean containsInClosure(int x,
int y)
x - the x coordinate of the point to be testedy - the y coordinate of the point to be tested
public boolean contains(int x,
int y)
contains in class Polygonx - the x coordinate of the point to be testedy - the y coordinate of the point to be testedpublic Enumeration horizontalLineIntersection(int y)
horizontalLineIntersection in class IlIntPolygony - the y coordinate of the horizontal line
IltPolygon.IlHorizontalInterval
public void addPoint(int x,
int y)
addPoint in class Polygonpublic Polygon getFillingPolygon()
getFillingPolygon in class IlIntPolygon
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||