/** * Tests if this ROI contains the given image location. * * @param x location X ordinate * @param y location Y ordinate * * @return {@code true} if the location is within this ROI; * {@code false} otherwise */ @Override public boolean contains(int x, int y) { return contains((double)x, (double)y); }
/** * Tests if this ROI contains the given rectangle. * * @param x rectangle origin X ordinate * @param y rectangle origin Y ordinate * @param w rectangle width * @param h rectangle height * * @return {@code true} if the rectangle is within this ROI; * {@code false} otherwise */ @Override public boolean contains(int x, int y, int w, int h) { return contains((double)x, (double)y, (double)w, (double)h); }
/** * Tests if this ROI contains the given point. * * @param p the point * * @return {@code true} if the point is within this ROI; * {@code false} otherwise */ @Override public boolean contains(Point p) { return contains(p.getX(), p.getY()); }
/** * Tests if this ROI contains the given point. * * @param p the point * * @return {@code true} if the point is within this ROI; * {@code false} otherwise */ @Override public boolean contains(Point2D p) { return contains(p.getX(), p.getY()); }
/** * Tests if this ROI contains the given rectangle. * * @param rect the rectangle * @return {@code true} if the rectangle is within this ROI; * {@code false} otherwise */ @Override public boolean contains(Rectangle2D rect) { return contains(rect.getMinX(), rect.getMinY(), rect.getWidth(), rect.getHeight()); }
/** * Tests if this ROI contains the given rectangle. * * @param rect the rectangle * @return {@code true} if the rectangle is within this ROI; * {@code false} otherwise */ @Override public boolean contains(Rectangle rect) { return contains(rect.getMinX(), rect.getMinY(), rect.getWidth(), rect.getHeight()); }