Lines Matching refs:npoints

61      * The total number of points.  The value of {@code npoints}
71 public int npoints;
78 * array. The value of {@link #npoints npoints} is equal to the
92 * array. The value of {@code npoints} is equal to the
136 * @param npoints the total number of points in the
139 * {@code npoints} is negative.
140 * @exception IndexOutOfBoundsException if {@code npoints} is
147 public Polygon(int xpoints[], int ypoints[], int npoints) {
149 // of OutOfMemoryError if npoints is huge and > {x,y}points.length
150 if (npoints > xpoints.length || npoints > ypoints.length) {
151 throw new IndexOutOfBoundsException("npoints > xpoints.length || "+
152 "npoints > ypoints.length");
155 // negative npoints
156 if (npoints < 0) {
157 throw new NegativeArraySizeException("npoints < 0");
160 // exactly npoints in length
161 this.npoints = npoints;
162 this.xpoints = Arrays.copyOf(xpoints, npoints);
163 this.ypoints = Arrays.copyOf(ypoints, npoints);
184 npoints = 0;
213 for (int i = 0; i < npoints; i++) {
227 * @param npoints the total number of points
229 void calculateBounds(int xpoints[], int ypoints[], int npoints) {
235 for (int i = 0; i < npoints; i++) {
286 if (npoints >= xpoints.length || npoints >= ypoints.length) {
287 int newLength = npoints * 2;
299 xpoints[npoints] = x;
300 ypoints[npoints] = y;
301 npoints++;
329 if (npoints == 0) {
333 calculateBounds(xpoints, ypoints, npoints);
398 if (npoints <= 2 || !getBoundingBox().contains(x, y)) {
403 int lastx = xpoints[npoints - 1];
404 int lasty = ypoints[npoints - 1];
408 for (int i = 0; i < npoints; lastx = curx, lasty = cury, i++) {
464 int lastx = xpoints[npoints - 1];
465 int lasty = ypoints[npoints - 1];
469 for (int i = 0; i < npoints; i++) {
495 if (npoints <= 0 || !getBoundingBox().intersects(x, y, w, h)) {
516 if (npoints <= 0 || !getBoundingBox().intersects(x, y, w, h)) {
582 if (pg.npoints == 0) {
604 return index > poly.npoints;
635 if (index >= poly.npoints) {
666 if (index >= poly.npoints) {