|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Represents a rectangular region on the backing store. More...
Public Member Functions | |
| Rect () | |
| Rect (final Object userData) | |
| Rect (final int x, final int y, final int w, final int h, final Object userData) | |
| int | x () |
| int | y () |
| int | w () |
| int | h () |
| Object | getUserData () |
| Rect | getNextLocation () |
| void | setPosition (final int x, final int y) |
| void | setSize (final int w, final int h) throws IllegalArgumentException |
| void | setUserData (final Object obj) |
| void | setNextLocation (final Rect nextLocation) |
| int | maxX () |
| Returns the maximum x-coordinate contained within this rectangle. More... | |
| int | maxY () |
| Returns the maximum y-coordinate contained within this rectangle. More... | |
| boolean | canContain (final Rect other) |
| String | toString () |
Represents a rectangular region on the backing store.
The edges of the rectangle are the infinitely thin region between adjacent pixels on the screen. The origin of the rectangle is its upper-left corner. It is inclusive of the pixels on the top and left edges and exclusive of the pixels on the bottom and right edges. For example, a rect at position (0, 0) and of size (1, 1) would include only the pixel at (0, 0).
Negative coordinates and sizes are not supported, since they make no sense in the context of the packer, which deals only with positively sized regions.
This class contains a user data field for efficient hookup to external data structures as well as enough other hooks to efficiently plug into the rectangle packer.
| com.jogamp.opengl.util.packrect.Rect.Rect | ( | final Object | userData | ) |
| com.jogamp.opengl.util.packrect.Rect.Rect | ( | final int | x, |
| final int | y, | ||
| final int | w, | ||
| final int | h, | ||
| final Object | userData | ||
| ) |
| boolean com.jogamp.opengl.util.packrect.Rect.canContain | ( | final Rect | other | ) |
| Rect com.jogamp.opengl.util.packrect.Rect.getNextLocation | ( | ) |
| Object com.jogamp.opengl.util.packrect.Rect.getUserData | ( | ) |
| int com.jogamp.opengl.util.packrect.Rect.h | ( | ) |
| int com.jogamp.opengl.util.packrect.Rect.maxX | ( | ) |
Returns the maximum x-coordinate contained within this rectangle.
Note that this returns a different result than Java 2D's rectangles; for a rectangle of position (0, 0) and size (1, 1) this will return 0, not 1. Returns -1 if the width of this rectangle is 0.
| int com.jogamp.opengl.util.packrect.Rect.maxY | ( | ) |
Returns the maximum y-coordinate contained within this rectangle.
Note that this returns a different result than Java 2D's rectangles; for a rectangle of position (0, 0) and size (1, 1) this will return 0, not 1. Returns -1 if the height of this rectangle is 0.
| void com.jogamp.opengl.util.packrect.Rect.setNextLocation | ( | final Rect | nextLocation | ) |
| void com.jogamp.opengl.util.packrect.Rect.setPosition | ( | final int | x, |
| final int | y | ||
| ) |
| void com.jogamp.opengl.util.packrect.Rect.setSize | ( | final int | w, |
| final int | h | ||
| ) | throws IllegalArgumentException |
| void com.jogamp.opengl.util.packrect.Rect.setUserData | ( | final Object | obj | ) |
| int com.jogamp.opengl.util.packrect.Rect.w | ( | ) |
| int com.jogamp.opengl.util.packrect.Rect.x | ( | ) |
| int com.jogamp.opengl.util.packrect.Rect.y | ( | ) |