JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.packrect.Rect Class Reference

Represents a rectangular region on the backing store. More...

Collaboration diagram for com.jogamp.opengl.util.packrect.Rect:

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 ()
 

Detailed Description

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.

Definition at line 58 of file Rect.java.

Constructor & Destructor Documentation

◆ Rect() [1/3]

com.jogamp.opengl.util.packrect.Rect.Rect ( )

Definition at line 76 of file Rect.java.

◆ Rect() [2/3]

com.jogamp.opengl.util.packrect.Rect.Rect ( final Object  userData)

Definition at line 80 of file Rect.java.

◆ Rect() [3/3]

com.jogamp.opengl.util.packrect.Rect.Rect ( final int  x,
final int  y,
final int  w,
final int  h,
final Object  userData 
)

Definition at line 84 of file Rect.java.

Here is the call graph for this function:

Member Function Documentation

◆ canContain()

boolean com.jogamp.opengl.util.packrect.Rect.canContain ( final Rect  other)

Definition at line 142 of file Rect.java.

Here is the caller graph for this function:

◆ getNextLocation()

Rect com.jogamp.opengl.util.packrect.Rect.getNextLocation ( )

Definition at line 95 of file Rect.java.

Here is the caller graph for this function:

◆ getUserData()

Object com.jogamp.opengl.util.packrect.Rect.getUserData ( )

Definition at line 94 of file Rect.java.

Here is the caller graph for this function:

◆ h()

int com.jogamp.opengl.util.packrect.Rect.h ( )

Definition at line 93 of file Rect.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxX()

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.

Definition at line 125 of file Rect.java.

◆ maxY()

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.

Definition at line 136 of file Rect.java.

◆ setNextLocation()

void com.jogamp.opengl.util.packrect.Rect.setNextLocation ( final Rect  nextLocation)

Definition at line 116 of file Rect.java.

◆ setPosition()

void com.jogamp.opengl.util.packrect.Rect.setPosition ( final int  x,
final int  y 
)

Definition at line 97 of file Rect.java.

Here is the caller graph for this function:

◆ setSize()

void com.jogamp.opengl.util.packrect.Rect.setSize ( final int  w,
final int  h 
) throws IllegalArgumentException

Definition at line 106 of file Rect.java.

Here is the caller graph for this function:

◆ setUserData()

void com.jogamp.opengl.util.packrect.Rect.setUserData ( final Object  obj)

Definition at line 115 of file Rect.java.

Here is the caller graph for this function:

◆ toString()

String com.jogamp.opengl.util.packrect.Rect.toString ( )

Definition at line 148 of file Rect.java.

◆ w()

int com.jogamp.opengl.util.packrect.Rect.w ( )

Definition at line 92 of file Rect.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ x()

int com.jogamp.opengl.util.packrect.Rect.x ( )

Definition at line 90 of file Rect.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ y()

int com.jogamp.opengl.util.packrect.Rect.y ( )

Definition at line 91 of file Rect.java.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: