JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Public Member Functions | |
Rectangle () | |
Rectangle (final int x, final int y, final int width, final int height) | |
Rectangle (final RectangleImmutable s) | |
Object | cloneMutable () |
final int | getX () |
x-position, left of rectangle. More... | |
final int | getY () |
y-position, top of rectangle. More... | |
final int | getWidth () |
final int | getHeight () |
final Rectangle | set (final int x, final int y, final int width, final int height) |
final Rectangle | set (final RectangleImmutable s) |
final Rectangle | setX (final int x) |
final Rectangle | setY (final int y) |
final Rectangle | setWidth (final int width) |
final Rectangle | setHeight (final int height) |
final Rectangle | union (final RectangleImmutable r) |
Returns a new Rectangle instance containing the union of this rectangle and the given rectangle. More... | |
final 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... | |
final Rectangle | union (final List< RectangleImmutable > rectangles) |
Calculates the union of the given rectangles, stores it in this instance and returns this instance. More... | |
final Rectangle | intersection (final RectangleImmutable r) |
Returns a new Rectangle instance containing the intersection of this rectangle and the given rectangle. More... | |
final 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... | |
final float | coverage (final RectangleImmutable r) |
Returns the coverage of given rectangle w/ this this one, i.e. More... | |
final boolean | contains (final RectangleImmutable r) |
final Rectangle | scale (final int sx, final int sy) |
Scale this instance's components, i.e. More... | |
final Rectangle | scale (final float sx, final float sy) |
Scale this instance's components, i.e. More... | |
final Rectangle | scaleInv (final int sx, final int sy) |
Inverse scale this instance's components, i.e. More... | |
final Rectangle | scaleInv (final float sx, final float sy) |
Inverse scale this instance's components, i.e. More... | |
int | compareTo (final RectangleImmutable d) |
boolean | equals (final Object obj) |
Checks whether two rect objects are equal. More... | |
int | hashCode () |
String | toString () |
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 () |
Protected Member Functions | |
Object | clone () |
Definition at line 33 of file Rectangle.java.
com.jogamp.nativewindow.util.Rectangle.Rectangle | ( | ) |
com.jogamp.nativewindow.util.Rectangle.Rectangle | ( | final int | x, |
final int | y, | ||
final int | width, | ||
final int | height | ||
) |
Definition at line 43 of file Rectangle.java.
com.jogamp.nativewindow.util.Rectangle.Rectangle | ( | final RectangleImmutable | s | ) |
Definition at line 49 of file Rectangle.java.
|
protected |
Object com.jogamp.nativewindow.util.Rectangle.cloneMutable | ( | ) |
int com.jogamp.nativewindow.util.Rectangle.compareTo | ( | final RectangleImmutable | d | ) |
Compares square of size 1st, if equal the square of position.
Compares square of size 1st, if equal the square of position.
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 232 of file Rectangle.java.
final boolean com.jogamp.nativewindow.util.Rectangle.contains | ( | final RectangleImmutable | r | ) |
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 157 of file Rectangle.java.
final float com.jogamp.nativewindow.util.Rectangle.coverage | ( | final 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 ) ;
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 149 of file Rectangle.java.
boolean com.jogamp.nativewindow.util.Rectangle.equals | ( | final 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
. Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 258 of file Rectangle.java.
final int com.jogamp.nativewindow.util.Rectangle.getHeight | ( | ) |
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 74 of file Rectangle.java.
final int com.jogamp.nativewindow.util.Rectangle.getWidth | ( | ) |
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 72 of file Rectangle.java.
final int com.jogamp.nativewindow.util.Rectangle.getX | ( | ) |
x-position, left of rectangle.
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 68 of file Rectangle.java.
final int com.jogamp.nativewindow.util.Rectangle.getY | ( | ) |
y-position, top of rectangle.
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 70 of file Rectangle.java.
int com.jogamp.nativewindow.util.Rectangle.hashCode | ( | ) |
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 269 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.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.
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 126 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.intersection | ( | final RectangleImmutable | r | ) |
Returns a new Rectangle
instance containing the intersection of this rectangle and the given rectangle.
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 122 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.scale | ( | final float | sx, |
final float | sy | ||
) |
Scale this instance's components, i.e.
multiply them by the given scale factors (rounded).
sx | scale factor for x |
sy | scale factor for y |
Definition at line 193 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.scale | ( | final int | sx, |
final int | sy | ||
) |
Scale this instance's components, i.e.
multiply them by the given scale factors.
sx | scale factor for x |
sy | scale factor for y |
Definition at line 178 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.scaleInv | ( | final float | sx, |
final float | sy | ||
) |
Inverse scale this instance's components, i.e.
divide them by the given scale factors (rounded).
sx | inverse scale factor for x |
sy | inverse scale factor for y |
Definition at line 223 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.scaleInv | ( | final int | sx, |
final int | sy | ||
) |
Inverse scale this instance's components, i.e.
divide them by the given scale factors.
sx | inverse scale factor for x |
sy | inverse scale factor for y |
Definition at line 208 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.set | ( | final int | x, |
final int | y, | ||
final int | width, | ||
final int | height | ||
) |
final Rectangle com.jogamp.nativewindow.util.Rectangle.set | ( | final RectangleImmutable | s | ) |
final Rectangle com.jogamp.nativewindow.util.Rectangle.setHeight | ( | final int | height | ) |
Definition at line 93 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.setWidth | ( | final int | width | ) |
Definition at line 92 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.setX | ( | final int | x | ) |
Definition at line 90 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.setY | ( | final int | y | ) |
Definition at line 91 of file Rectangle.java.
String com.jogamp.nativewindow.util.Rectangle.toString | ( | ) |
Definition at line 279 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.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.
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 100 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.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 |
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 108 of file Rectangle.java.
final Rectangle com.jogamp.nativewindow.util.Rectangle.union | ( | final RectangleImmutable | r | ) |
Returns a new Rectangle
instance containing the union of this rectangle and the given rectangle.
Implements com.jogamp.nativewindow.util.RectangleImmutable.
Definition at line 96 of file Rectangle.java.