|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Immutable Rectangle interface, with its position on the top-left. More...
Public Member Functions | |
| int | getHeight () |
| int | getWidth () |
| int | getX () |
| x-position, left of rectangle. More... | |
| int | getY () |
| y-position, top of rectangle. More... | |
| Rectangle | union (final RectangleImmutable r) |
Returns a new Rectangle instance containing the union of this rectangle and the given rectangle. More... | |
| Rectangle | union (final int rx1, final int ry1, final int rx2, final int ry2) |
Returns a new Rectangle instance containing the union of this rectangle and the given coordinates. More... | |
| Rectangle | union (final List< RectangleImmutable > rectangles) |
| Calculates the union of the given rectangles, stores it in this instance and returns this instance. More... | |
| Rectangle | intersection (RectangleImmutable r) |
Returns a new Rectangle instance containing the intersection of this rectangle and the given rectangle. More... | |
| Rectangle | intersection (final int rx1, final int ry1, final int rx2, final int ry2) |
Returns a new Rectangle instance containing the intersection of this rectangle and the given coordinates. More... | |
| float | coverage (RectangleImmutable r) |
| Returns the coverage of given rectangle w/ this this one, i.e. More... | |
| boolean | contains (RectangleImmutable r) |
| int | compareTo (final RectangleImmutable d) |
| boolean | equals (Object obj) |
| Checks whether two rect objects are equal. More... | |
| int | hashCode () |
Immutable Rectangle interface, with its position on the top-left.
Definition at line 36 of file RectangleImmutable.java.
| int com.jogamp.nativewindow.util.RectangleImmutable.compareTo | ( | final RectangleImmutable | d | ) |
Compares square of size 1st, if equal the square of position.
Implemented in com.jogamp.nativewindow.util.Rectangle.
| boolean com.jogamp.nativewindow.util.RectangleImmutable.contains | ( | RectangleImmutable | r | ) |
Implemented in com.jogamp.nativewindow.util.Rectangle.
| float com.jogamp.nativewindow.util.RectangleImmutable.coverage | ( | RectangleImmutable | r | ) |
Returns the coverage of given rectangle w/ this this one, i.e.
between 0.0 and 1.0.
Coverage is computed by:
isect = this.intersection(r); coverage = area( isect ) / area( this ) ;
Implemented in com.jogamp.nativewindow.util.Rectangle.
| boolean com.jogamp.nativewindow.util.RectangleImmutable.equals | ( | Object | obj | ) |
Checks whether two rect objects are equal.
Two instances of Rectangle are equal if the four integer values of the fields y, x, height, and width are all equal.
true if the two rectangles are equal; otherwise false. Implemented in com.jogamp.nativewindow.util.Rectangle.
| int com.jogamp.nativewindow.util.RectangleImmutable.getHeight | ( | ) |
| int com.jogamp.nativewindow.util.RectangleImmutable.getWidth | ( | ) |
| int com.jogamp.nativewindow.util.RectangleImmutable.getX | ( | ) |
x-position, left of rectangle.
Implemented in com.jogamp.nativewindow.util.Rectangle.
| int com.jogamp.nativewindow.util.RectangleImmutable.getY | ( | ) |
y-position, top of rectangle.
Implemented in com.jogamp.nativewindow.util.Rectangle.
| int com.jogamp.nativewindow.util.RectangleImmutable.hashCode | ( | ) |
Implemented in com.jogamp.nativewindow.util.Rectangle.
| Rectangle com.jogamp.nativewindow.util.RectangleImmutable.intersection | ( | final int | rx1, |
| final int | ry1, | ||
| final int | rx2, | ||
| final int | ry2 | ||
| ) |
Returns a new Rectangle instance containing the intersection of this rectangle and the given coordinates.
Implemented in com.jogamp.nativewindow.util.Rectangle.
| Rectangle com.jogamp.nativewindow.util.RectangleImmutable.intersection | ( | RectangleImmutable | r | ) |
Returns a new Rectangle instance containing the intersection of this rectangle and the given rectangle.
Implemented in com.jogamp.nativewindow.util.Rectangle.
| Rectangle com.jogamp.nativewindow.util.RectangleImmutable.union | ( | final int | rx1, |
| final int | ry1, | ||
| final int | rx2, | ||
| final int | ry2 | ||
| ) |
Returns a new Rectangle instance containing the union of this rectangle and the given coordinates.
Implemented in com.jogamp.nativewindow.util.Rectangle.
| Rectangle com.jogamp.nativewindow.util.RectangleImmutable.union | ( | final List< RectangleImmutable > | rectangles | ) |
Calculates the union of the given rectangles, stores it in this instance and returns this instance.
| rectangles | given list of rectangles |
Implemented in com.jogamp.nativewindow.util.Rectangle.
| Rectangle com.jogamp.nativewindow.util.RectangleImmutable.union | ( | final RectangleImmutable | r | ) |
Returns a new Rectangle instance containing the union of this rectangle and the given rectangle.
Implemented in com.jogamp.nativewindow.util.Rectangle.