JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.nativewindow.util.RectangleImmutable Interface Reference

Immutable Rectangle interface, with its position on the top-left. More...

Inheritance diagram for com.jogamp.nativewindow.util.RectangleImmutable:
Collaboration diagram for com.jogamp.nativewindow.util.RectangleImmutable:

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

Detailed Description

Immutable Rectangle interface, with its position on the top-left.

Definition at line 36 of file RectangleImmutable.java.

Member Function Documentation

◆ compareTo()

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.

◆ contains()

boolean com.jogamp.nativewindow.util.RectangleImmutable.contains ( RectangleImmutable  r)

◆ coverage()

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.

◆ equals()

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.

Returns
true if the two rectangles are equal; otherwise false.

Implemented in com.jogamp.nativewindow.util.Rectangle.

◆ getHeight()

int com.jogamp.nativewindow.util.RectangleImmutable.getHeight ( )

Implemented in com.jogamp.nativewindow.util.Rectangle.

Here is the caller graph for this function:

◆ getWidth()

int com.jogamp.nativewindow.util.RectangleImmutable.getWidth ( )

Implemented in com.jogamp.nativewindow.util.Rectangle.

Here is the caller graph for this function:

◆ getX()

int com.jogamp.nativewindow.util.RectangleImmutable.getX ( )

x-position, left of rectangle.

Implemented in com.jogamp.nativewindow.util.Rectangle.

Here is the caller graph for this function:

◆ getY()

int com.jogamp.nativewindow.util.RectangleImmutable.getY ( )

y-position, top of rectangle.

Implemented in com.jogamp.nativewindow.util.Rectangle.

Here is the caller graph for this function:

◆ hashCode()

int com.jogamp.nativewindow.util.RectangleImmutable.hashCode ( )

◆ intersection() [1/2]

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.

◆ intersection() [2/2]

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.

◆ union() [1/3]

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.

◆ union() [2/3]

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.

Parameters
rectanglesgiven list of rectangles
Returns
this instance holding the union of given rectangles.

Implemented in com.jogamp.nativewindow.util.Rectangle.

◆ union() [3/3]

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.


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