Package java.awt

Examples of java.awt.Shape.intersects()


        Iterator i = shapes();

        while (i.hasNext()) {
            s = (Shape) i.next();

            if (s.intersects(region)) {
                g.draw(s);
            }
        }
    }
View Full Code Here


  }
 
  @Override
  public boolean isIntersecting(Shape searchArea) {
    Shape shape = new Ellipse2D.Double(getPosition().getX(), getPosition().getY(), getRadius(), getRadius());
    return shape.intersects(searchArea.getBounds2D()) && searchArea.intersects(shape.getBounds2D());
  }

  @Override
  public String toString() {
    if (element instanceof CircleEventModel) {
View Full Code Here

  }
 
  @Override
  public boolean isIntersecting(Shape searchArea) {
    Shape shape = new Ellipse2D.Double(getPosition().getX(), getPosition().getY(), getRadius(), getRadius());
    return shape.intersects(searchArea.getBounds2D()) && searchArea.intersects(shape.getBounds2D());
  }
 
  @Override
  public String toString() {
    return "Circle Scenario";
View Full Code Here

                Shape gBounds = gv.getGlyphLogicalBounds(g);
                if (gBounds != null)
                    gBounds = at.createTransformedShape
                        (gBounds).getBounds2D();

                if (gBounds.intersects(rect)) {
                    elems.add(elem);
                    break;
                }
            }
        }
View Full Code Here

                Shape gBounds = gv.getGlyphLogicalBounds(g);
                if (gBounds != null)
                    gBounds = at.createTransformedShape
                        (gBounds).getBounds2D();

                if (gBounds.intersects(rect))
                    return true;
            }
        }
        return false;
    }
View Full Code Here

                } if (gn instanceof ShapeNode) {
                    ShapeNode sn = (ShapeNode)gn;
                    Shape sensitive = sn.getSensitiveArea();
                    if (sensitive != null) {
                        sensitive = at.createTransformedShape(sensitive);
                        if (sensitive.intersects(rect))
                            ret.add(curr);
                    }
                } else if (gn instanceof TextNode) {
                    SVGOMElement svgElem = (SVGOMElement)curr;
                    SVGTextElementBridge txtBridge;
View Full Code Here

        ShapeNode sn = (ShapeNode)gn;
        Shape sensitive = sn.getSensitiveArea();
        if (sensitive == null) return false;

        sensitive = at.createTransformedShape(sensitive);
        if (sensitive.intersects(rect))
            return true;

        return false;
    }
View Full Code Here

                Shape gBounds = gv.getGlyphLogicalBounds(g);
                if (gBounds != null)
                    gBounds = at.createTransformedShape
                        (gBounds).getBounds2D();

                if (gBounds.intersects(rect)) {
                    elems.add(elem);
                    break;
                }
            }
        }
View Full Code Here

                Shape gBounds = gv.getGlyphLogicalBounds(g);
                if (gBounds != null)
                    gBounds = at.createTransformedShape
                        (gBounds).getBounds2D();

                if (gBounds.intersects(rect))
                    return true;
            }
        }
        return false;
    }
View Full Code Here

                } if (gn instanceof ShapeNode) {
                    ShapeNode sn = (ShapeNode)gn;
                    Shape sensitive = sn.getSensitiveArea();
                    if (sensitive != null) {
                        sensitive = at.createTransformedShape(sensitive);
                        if (sensitive.intersects(rect))
                            ret.add(curr);
                    }
                } else if (gn instanceof TextNode) {
                    SVGOMElement svgElem = (SVGOMElement)curr;
                    SVGTextElementBridge txtBridge;
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.