Example usage for Java java.awt.geom Rectangle2D fields, constructors, methods, implement or subclass
The text is from its open source code.
int | OUT_LEFT The bitmask that indicates that a point lies to the left of this Rectangle2D . |
int | OUT_TOP The bitmask that indicates that a point lies above this Rectangle2D . |
int | OUT_RIGHT The bitmask that indicates that a point lies to the right of this Rectangle2D . |
int | OUT_BOTTOM The bitmask that indicates that a point lies below this Rectangle2D . |
void | add(Point2D pt) Adds the Point2D object pt to this Rectangle2D . |
void | add(Rectangle2D r) Adds a Rectangle2D object to this Rectangle2D . |
Object | clone() Creates a new object of the same class and with the same contents as this object. |
boolean | contains(Point2D p) |
boolean | contains(double x, double y) |
boolean | contains(double x, double y, double w, double h) |
Rectangle2D | createIntersection(Rectangle2D r) Returns a new Rectangle2D object representing the intersection of this Rectangle2D with the specified Rectangle2D . |
Rectangle | getBounds() |
Rectangle2D | getBounds2D() |
double | getCenterX() Returns the X coordinate of the center of the framing rectangle of the Shape in double precision. |
double | getCenterY() Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision. |
double | getHeight() Returns the height of the framing rectangle in double precision. |
double | getMaxX() Returns the largest X coordinate of the framing rectangle of the Shape in double precision. |
double | getMaxY() Returns the largest Y coordinate of the framing rectangle of the Shape in double precision. |
double | getMinX() Returns the smallest X coordinate of the framing rectangle of the Shape in double precision. |
double | getMinY() Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision. |
double | getWidth() Returns the width of the framing rectangle in double precision. |
double | getX() Returns the X coordinate of the upper-left corner of the framing rectangle in double precision. |
double | getY() Returns the Y coordinate of the upper-left corner of the framing rectangle in double precision. |
void | intersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) Intersects the pair of specified source Rectangle2D objects and puts the result into the specified destination Rectangle2D object. |
boolean | intersects(Rectangle2D r) |
boolean | intersects(double x, double y, double w, double h) |
boolean | intersectsLine(double x1, double y1, double x2, double y2) Tests if the specified line segment intersects the interior of this Rectangle2D . |
boolean | isEmpty() Determines whether the RectangularShape is empty. |
int | outcode(double x, double y) Determines where the specified coordinates lie with respect to this Rectangle2D . |
void | setFrame(Point2D loc, Dimension2D size) Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D , respectively. |
void | setFrame(double x, double y, double w, double h) Sets the location and size of the outer bounds of this Rectangle2D to the specified rectangular values. |
void | setFrameFromDiagonal(double x1, double y1, double x2, double y2) Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates. |
void | setFrameFromDiagonal(Point2D p1, Point2D p2) Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects. |
void | setRect(double x, double y, double w, double h) Sets the location and size of this Rectangle2D to the specified double values. |
void | setRect(Rectangle2D r) Sets this Rectangle2D to be the same as the specified Rectangle2D . |
void | union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dest) Unions the pair of source Rectangle2D objects and puts the result into the specified destination Rectangle2D object. |