Catalano.Imaging.Shapes
Class IntPolygon
- java.lang.Object
-
- Catalano.Imaging.Shapes.IntPolygon
-
public class IntPolygon extends java.lang.ObjectRepresent polygon.
-
-
Constructor Summary
Constructors Constructor and Description IntPolygon()Initialize a new instance of the IntPolygon class.IntPolygon(int[] x, int[] y)Initialize a new instance of the IntPolygon class.IntPolygon(int[] x, int[] y, int nPoints)Initialize a new instance of the IntPolygon class.IntPolygon(java.util.List<IntPoint> lstPoints)Initialize a new instance of the IntPolygon class.IntPolygon(java.util.List<IntPoint> lstPoints, int nPoints)Initialize a new instance of the IntPolygon class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPoint(int x, int y)Add point in the polygon.voidaddPoint(IntPoint point)Add point in the polygon.intgetNPoints()Get number of points.java.util.List<IntPoint>getPoints()Get points.int[]getX()Get X axis coordinates.int[]getY()Get Y axis coordinates.
-
-
-
Constructor Detail
-
IntPolygon
public IntPolygon()
Initialize a new instance of the IntPolygon class.
-
IntPolygon
public IntPolygon(int[] x, int[] y)Initialize a new instance of the IntPolygon class.- Parameters:
x- X axis coordinate.y- Y axis coordinate.
-
IntPolygon
public IntPolygon(int[] x, int[] y, int nPoints)Initialize a new instance of the IntPolygon class.- Parameters:
x- X axis coordinate.y- Y axis coordinate.nPoints- Number of points.
-
IntPolygon
public IntPolygon(java.util.List<IntPoint> lstPoints)
Initialize a new instance of the IntPolygon class.- Parameters:
lstPoints- List of points.
-
IntPolygon
public IntPolygon(java.util.List<IntPoint> lstPoints, int nPoints)
Initialize a new instance of the IntPolygon class.- Parameters:
lstPoints- List of points.nPoints- Number of points.
-
-
Method Detail
-
getX
public int[] getX()
Get X axis coordinates.- Returns:
- X axis coordinates.
-
getY
public int[] getY()
Get Y axis coordinates.- Returns:
- Y axis coordinates.
-
getNPoints
public int getNPoints()
Get number of points.- Returns:
- Number of points.
-
getPoints
public java.util.List<IntPoint> getPoints()
Get points.- Returns:
- Points.
-
addPoint
public void addPoint(IntPoint point)
Add point in the polygon.- Parameters:
point- Point.
-
addPoint
public void addPoint(int x, int y)Add point in the polygon.- Parameters:
x- X axis coordinate.y- Y axis coordinate.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG