Ejemplo n.º 1
0
 public boolean contains(int x, int y) {
   if (!super.contains(x, y)) return false;
   if (xSpline != null) {
     FloatPolygon poly = new FloatPolygon(xSpline, ySpline, splinePoints);
     return poly.contains(x - this.x, y - this.y);
   } else if (xpf != null) {
     FloatPolygon poly = new FloatPolygon(xpf, ypf, nPoints);
     return poly.contains(x - this.x, y - this.y);
   } else {
     Polygon poly = new Polygon(xp, yp, nPoints);
     return poly.contains(x - this.x, y - this.y);
   }
 }