Package java.awt.geom

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


    final 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


      }
      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);
  }

  /**
   * This initialises the stream by saving the current graphics state, and
   * setting up the default line width (for us).
View Full Code Here

            for(int i = 0; i < numIndices; i++) {
                int tx = tileIndices[i].x;
                int ty = tileIndices[i].y;
                Raster tile = tiles[tx][ty];
                if ((tile != null) &&
        invalidArea.intersects(tile.getBounds())) {
                    tiles[tx][ty] = null;
                }
            }

            if(eventManager.hasListeners("InvalidRegion")) {
View Full Code Here

    final Shape clip = getClip();
    if (clip != null)
    {
      area.intersect(new Area(clip));
    }
    return area.intersects(rect.x, rect.y, rect.width, rect.height);
  }

  /**
   * Returns the device configuration associated with this
   * <code>Graphics2D</code>.
 
View Full Code Here

    final 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

   */
  public void test(TestHarness harness)     
  {
    // intersects(double, double, double, double)
    Area area = new Area();
    harness.check(!area.intersects(0.0, 0.0, 0.0, 0.0))// 1
 
    area.add(new Area(new Rectangle2D.Double(1.0, 1.0, 1.0, 1.0)));
    harness.check(!area.intersects(0.0, 0.0, 1.0, 1.0))// 2
    harness.check(!area.intersects(1.0, 0.0, 1.0, 1.0))// 3
    harness.check(!area.intersects(2.0, 0.0, 1.0, 1.0))// 4
View Full Code Here

    // intersects(double, double, double, double)
    Area area = new Area();
    harness.check(!area.intersects(0.0, 0.0, 0.0, 0.0))// 1
 
    area.add(new Area(new Rectangle2D.Double(1.0, 1.0, 1.0, 1.0)));
    harness.check(!area.intersects(0.0, 0.0, 1.0, 1.0))// 2
    harness.check(!area.intersects(1.0, 0.0, 1.0, 1.0))// 3
    harness.check(!area.intersects(2.0, 0.0, 1.0, 1.0))// 4
    harness.check(!area.intersects(0.0, 1.0, 1.0, 1.0))// 5
    harness.check(area.intersects(1.0, 1.0, 1.0, 1.0));   // 6
    harness.check(!area.intersects(2.0, 1.0, 1.0, 1.0))// 7
View Full Code Here

    Area area = new Area();
    harness.check(!area.intersects(0.0, 0.0, 0.0, 0.0))// 1
 
    area.add(new Area(new Rectangle2D.Double(1.0, 1.0, 1.0, 1.0)));
    harness.check(!area.intersects(0.0, 0.0, 1.0, 1.0))// 2
    harness.check(!area.intersects(1.0, 0.0, 1.0, 1.0))// 3
    harness.check(!area.intersects(2.0, 0.0, 1.0, 1.0))// 4
    harness.check(!area.intersects(0.0, 1.0, 1.0, 1.0))// 5
    harness.check(area.intersects(1.0, 1.0, 1.0, 1.0));   // 6
    harness.check(!area.intersects(2.0, 1.0, 1.0, 1.0))// 7
    harness.check(!area.intersects(0.0, 2.0, 1.0, 1.0))// 8
View Full Code Here

    harness.check(!area.intersects(0.0, 0.0, 0.0, 0.0))// 1
 
    area.add(new Area(new Rectangle2D.Double(1.0, 1.0, 1.0, 1.0)));
    harness.check(!area.intersects(0.0, 0.0, 1.0, 1.0))// 2
    harness.check(!area.intersects(1.0, 0.0, 1.0, 1.0))// 3
    harness.check(!area.intersects(2.0, 0.0, 1.0, 1.0))// 4
    harness.check(!area.intersects(0.0, 1.0, 1.0, 1.0))// 5
    harness.check(area.intersects(1.0, 1.0, 1.0, 1.0));   // 6
    harness.check(!area.intersects(2.0, 1.0, 1.0, 1.0))// 7
    harness.check(!area.intersects(0.0, 2.0, 1.0, 1.0))// 8
    harness.check(!area.intersects(1.0, 2.0, 1.0, 1.0))// 9
View Full Code Here

 
    area.add(new Area(new Rectangle2D.Double(1.0, 1.0, 1.0, 1.0)));
    harness.check(!area.intersects(0.0, 0.0, 1.0, 1.0))// 2
    harness.check(!area.intersects(1.0, 0.0, 1.0, 1.0))// 3
    harness.check(!area.intersects(2.0, 0.0, 1.0, 1.0))// 4
    harness.check(!area.intersects(0.0, 1.0, 1.0, 1.0))// 5
    harness.check(area.intersects(1.0, 1.0, 1.0, 1.0));   // 6
    harness.check(!area.intersects(2.0, 1.0, 1.0, 1.0))// 7
    harness.check(!area.intersects(0.0, 2.0, 1.0, 1.0))// 8
    harness.check(!area.intersects(1.0, 2.0, 1.0, 1.0))// 9
    harness.check(!area.intersects(2.0, 2.0, 1.0, 1.0))// 10
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.