/** * Delegates to the enclosed <code>GeneralPath</code>. */ public boolean contains(double x, double y) { return path.contains(x, y); }
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public boolean contains(Point2D p) { return path.contains(p); }
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public boolean contains(double x, double y, double w, double h) { return path.contains(x, y, w, h); }
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public boolean contains(Rectangle2D r) { return path.contains(r); }
public boolean contains(Rectangle2D rect){ GeneralPath path = makeIntoPath(); if(path != null) return path.contains(rect); return false; }
public boolean contains(ShapePoint point){ GeneralPath path = makeIntoPath(); if(path != null) return path.contains(point); return false; }
public void moveInwardsBy(float offset){ int type = this.getType(); if(type == TYPE_SLOPED) throw new RuntimeException("Cannot move a sloped egde inwards: "+this); float xOffset = 0; float yOffset = 0; ShapePoint middle = getMiddle(); GeneralPath path = owner.makeIntoPath(); if(type == TYPE_HORIZONTAL){ xOffset = 0; ShapePoint up = new ShapePoint(middle.x, middle.y - 0.05f); ShapePoint down = new ShapePoint(middle.x, middle.y + 0.05f); if(path.contains(up)) yOffset = -offset; else if(path.contains(down)) yOffset = offset; } else if(type == TYPE_VERTICAL){ yOffset = 0; ShapePoint left = new ShapePoint(middle.x - 0.05f, middle.y); ShapePoint right = new ShapePoint(middle.x + 0.05f, middle.y); if(path.contains(left)) xOffset = -offset; else if(path.contains(right)) xOffset = offset; } if(DEBUG) System.out.println("Moved edge "+this+" by "+xOffset+", "+yOffset); translate(xOffset, yOffset); }
public boolean contains(double x, double y, double w, double h) { return polygonPath.contains(x, y, w, h); }
public boolean contains(Rectangle2D r) { return polygonPath.contains(r); }
public boolean contains(Point2D p) { return polygonPath.contains(p); }
public boolean contains(double x, double y) { return polygonPath.contains(x, y); }
public boolean contains(double x, double y) { return getGeneralPath().contains(x, y); }
/** * Test whether the coordinate is inside or is vertex of ploygon. * * @param dp Point to be tested whether is inside of polygon. * @return True if the point is inside (or is the vertex of polygon, false if not. */ protected boolean containsOrIsVertex(DirectPosition dp) { if (generateGeneralPath(vertices).contains((Point2D) dp) || (hasVertex(dp))) { return true; } return false; }
public boolean contains(Rect r) { return getGeneralPath().contains(r.getRectangle2D()); }
public boolean contains(Point p) { return getGeneralPath().contains(p.toPoint2D()); }
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public boolean contains(Rectangle2D r) { return path.contains(r); }
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public boolean contains(double x, double y) { return path.contains(x, y); }
/** * Delegates to the enclosed <code>GeneralPath</code>. */ public boolean contains(Rectangle2D r) { return path.contains(r); }
public boolean contains(ShapePoint point){ GeneralPath path = makeIntoPath(); if(path != null) return path.contains(point); return false; }
public boolean contains(Rectangle2D rect){ GeneralPath path = makeIntoPath(); if(path != null) return path.contains(rect); return false; }