Package java.awt.geom

Examples of java.awt.geom.Area.intersects()


/*      */
/* 1622 */       for (int i = 0; i < numIndices; i++) {
/* 1623 */         int tx = tileIndices[i].x;
/* 1624 */         int ty = tileIndices[i].y;
/* 1625 */         Raster tile = this.tiles[tx][ty];
/* 1626 */         if ((tile != null) && (invalidArea.intersects(tile.getBounds())))
/*      */         {
/* 1628 */           this.tiles[tx][ty] = null;
/*      */         }
/*      */       }
/*      */
View Full Code Here


    repaint();
  }
 
  public int chkColl(Rectangle2D s, Rectangle2D f) {
    Area areaS = new Area(s);
    if (areaS.intersects(f) == true)
      return 1;
    else
      return 0;
  }
View Full Code Here

        }
        s = transform.createTransformedShape(s);
        Area area = new Area(s);
        if (clip != null)
            area.intersect(clip);
        return area.intersects(rect.x, rect.y, rect.width, rect.height);
    }

    /**
     * @see Graphics2D#getDeviceConfiguration()
     */
 
View Full Code Here

      CHECKPOSSIBLES:
        while (!possibles.isEmpty()) {
            r.setLocation(possibles.remove(0));

            // make sure the rectangle is in the view and not over a dead area
            if ((!bounds.contains(r)) || dead.intersects(r)) {
                continue;
            }

            // see if it hits any shapes we're trying to avoid
            for (Iterator<? extends Shape> iter = avoidShapes.iterator(); iter.hasNext(); ) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.