Esempio n. 1
0
  @Override
  public boolean Hit(Point p) {

    if (shape.getBounds2D().contains(p.x, p.y)) {
      if (shape.contains(p.x, p.y)) {
        return true;
      }
    }

    return false;
  }
Esempio n. 2
0
 /**
  * Checks whether the specified shape intersects the element
  *
  * @param s
  * @return
  */
 public boolean Overlaps(Shape s) {
   return shape.overlaps(s);
 }
Esempio n. 3
0
 @Override
 public boolean Hit(Rectangle transformedRectangle) {
   return shape.intersects(transformedRectangle);
 }
Esempio n. 4
0
 /**
  * Returns the element's bounds
  *
  * @return
  */
 public Rectangle2DExt getBounds() {
   return new Rectangle2DExt(shape.getBounds2D());
 }