/** * Tests if the interior of this <code>Polygon</code> intersects the * interior of a specified set of rectangular coordinates. * @param x the x coordinate of the specified rectangular * shape's top-left corner * @param y the y coordinate of the specified rectangular * shape's top-left corner * @param w the width of the specified rectangular shape * @param h the height of the specified rectangular shape * @return <code>true</code> if the interior of this * <code>Polygon</code> and the interior of the * specified set of rectangular * coordinates intersect each other; * <code>false</code> otherwise. */ public boolean intersects(double x, double y, double w, double h) { if (npoints <= 0 || !bounds.intersects(x, y, w, h)) { return false; } updateComputingPath(); return closedPath.intersects(x, y, w, h); }
/** * Tests if the interior of this <code>Polygon</code> intersects the * interior of a specified set of rectangular coordinates. * @param x the x coordinate of the specified rectangular * shape's top-left corner * @param y the y coordinate of the specified rectangular * shape's top-left corner * @param w the width of the specified rectangular shape * @param h the height of the specified rectangular shape * @return <code>true</code> if the interior of this * <code>Polygon</code> and the interior of the * specified set of rectangular * coordinates intersect each other; * <code>false</code> otherwise. */ public boolean intersects(double x, double y, double w, double h) { if (npoints <= 0 || !bounds.intersects(x, y, w, h)) { return false; } updateComputingPath(); return closedPath.intersects(x, y, w, h); }
/** * Tests if the interior of this <code>Polygon</code> intersects the * interior of a specified set of rectangular coordinates. * @param x the x coordinate of the specified rectangular * shape's top-left corner * @param y the y coordinate of the specified rectangular * shape's top-left corner * @param w the width of the specified rectangular shape * @param h the height of the specified rectangular shape * @return <code>true</code> if the interior of this * <code>Polygon</code> and the interior of the * specified set of rectangular * coordinates intersect each other; * <code>false</code> otherwise. */ public boolean intersects(double x, double y, double w, double h) { if (npoints <= 0 || !bounds.intersects(x, y, w, h)) { return false; } updateComputingPath(); return closedPath.intersects(x, y, w, h); }