Package java.awt.geom

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


   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness
  {
    Rectangle2D r = new Rectangle2D.Double(0.0, 0.0, 1.0, 1.0);
    harness.check(!r.intersects(-1.0, -1.0, 1.0, 1.0));
    harness.check(!r.intersects(-1.0, 0.0, 1.0, 1.0));
    harness.check(!r.intersects(0.0, -1.0, 1.0, 1.0));
    harness.check(r.intersects(0.0, 0.0, 1.0, 1.0));
   
    r = new Rectangle2D.Double();
View Full Code Here


   */
  public void test(TestHarness harness
  {
    Rectangle2D r = new Rectangle2D.Double(0.0, 0.0, 1.0, 1.0);
    harness.check(!r.intersects(-1.0, -1.0, 1.0, 1.0));
    harness.check(!r.intersects(-1.0, 0.0, 1.0, 1.0));
    harness.check(!r.intersects(0.0, -1.0, 1.0, 1.0));
    harness.check(r.intersects(0.0, 0.0, 1.0, 1.0));
   
    r = new Rectangle2D.Double();
    harness.check(!r.intersects(0.0, 0.0, 0.0, 0.0));
View Full Code Here

  public void test(TestHarness harness
  {
    Rectangle2D r = new Rectangle2D.Double(0.0, 0.0, 1.0, 1.0);
    harness.check(!r.intersects(-1.0, -1.0, 1.0, 1.0));
    harness.check(!r.intersects(-1.0, 0.0, 1.0, 1.0));
    harness.check(!r.intersects(0.0, -1.0, 1.0, 1.0));
    harness.check(r.intersects(0.0, 0.0, 1.0, 1.0));
   
    r = new Rectangle2D.Double();
    harness.check(!r.intersects(0.0, 0.0, 0.0, 0.0));
  }
View Full Code Here

  {
    Rectangle2D r = new Rectangle2D.Double(0.0, 0.0, 1.0, 1.0);
    harness.check(!r.intersects(-1.0, -1.0, 1.0, 1.0));
    harness.check(!r.intersects(-1.0, 0.0, 1.0, 1.0));
    harness.check(!r.intersects(0.0, -1.0, 1.0, 1.0));
    harness.check(r.intersects(0.0, 0.0, 1.0, 1.0));
   
    r = new Rectangle2D.Double();
    harness.check(!r.intersects(0.0, 0.0, 0.0, 0.0));
  }
View Full Code Here

    harness.check(!r.intersects(-1.0, 0.0, 1.0, 1.0));
    harness.check(!r.intersects(0.0, -1.0, 1.0, 1.0));
    harness.check(r.intersects(0.0, 0.0, 1.0, 1.0));
   
    r = new Rectangle2D.Double();
    harness.check(!r.intersects(0.0, 0.0, 0.0, 0.0));
  }

}
View Full Code Here

     * @param r the specified Rectangle2D in the user node space
     */
    public boolean intersects(Rectangle2D r) {
        Rectangle2D b = getBounds();
        if (b != null) {
            return (b.intersects(r) &&
                    paintedArea != null &&
                    paintedArea.intersects(r));
        }
        return false;
    }
View Full Code Here

            }
            // Factor in the clipping area, if any
            if(bounds != null){
                if (clip != null) {
                    Rectangle2D clipR = clip.getClipPath().getBounds2D();
                    if (clipR.intersects(bounds))
                        Rectangle2D.intersect(bounds, clipR, bounds);
                }
                // Factor in the mask, if any
                if (mask != null) {
                    Rectangle2D maskR = mask.getBounds2D();
View Full Code Here

                        Rectangle2D.intersect(bounds, clipR, bounds);
                }
                // Factor in the mask, if any
                if (mask != null) {
                    Rectangle2D maskR = mask.getBounds2D();
                    if (maskR.intersects(bounds))
                        Rectangle2D.intersect(bounds, maskR, bounds);
                }
            }

            // Make sure we haven't been interrupted
View Full Code Here

            .getChild(Quadrant.NW), nwRectangle, searchRegion);
        for (QuadTreeData q : nwMatches) {
          matches.add(q);
        }
      }
      if (neRectangle.intersects(searchRegion)) {
        List<QuadTreeData> neMatches = queryByPointRadius(point, radiusKM, node
            .getChild(Quadrant.NE), neRectangle, searchRegion);
        for (QuadTreeData q : neMatches) {
          matches.add(q);
        }
View Full Code Here

            .getChild(Quadrant.NW), nwRectangle, searchRegion);
        for (QuadTreeData q : nwMatches) {
          matches.add(q);
        }
      }
      if (neRectangle.intersects(searchRegion)) {
        List<QuadTreeData> neMatches = queryByBoundingBox(node
            .getChild(Quadrant.NE), neRectangle, searchRegion);
        for (QuadTreeData q : neMatches) {
          matches.add(q);
        }
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.