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

Generic PixelRectangle implementation. More...

Inheritance diagram for com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect:
Collaboration diagram for com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect:

Public Member Functions

 GenericPixelRect (final PixelFormat pixelformat, final DimensionImmutable size, int strideInBytes, final boolean isGLOriented, final ByteBuffer pixels) throws IllegalArgumentException, IndexOutOfBoundsException
 
 GenericPixelRect (final PixelRectangle src) throws IllegalArgumentException, IndexOutOfBoundsException
 Copy ctor validating src. More...
 
int hashCode ()
 
PixelFormat getPixelformat ()
 Returns the PixelFormat. More...
 
DimensionImmutable getSize ()
 Returns the size, i.e. More...
 
int getStride ()
 Returns stride in byte-size, i.e. More...
 
boolean isGLOriented ()
 Returns true if the memory is laid out in OpenGL's coordinate system, origin at bottom left. More...
 
ByteBuffer getPixels ()
 Returns the pixels. More...
 
final String toString ()
 
int hashCode ()
 
PixelFormat getPixelformat ()
 Returns the PixelFormat. More...
 
DimensionImmutable getSize ()
 Returns the size, i.e. More...
 
int getStride ()
 Returns stride in byte-size, i.e. More...
 
boolean isGLOriented ()
 Returns true if the memory is laid out in OpenGL's coordinate system, origin at bottom left. More...
 
ByteBuffer getPixels ()
 Returns the pixels. More...
 
String toString ()
 

Protected Attributes

final PixelFormat pixelformat
 
final DimensionImmutable size
 
final int strideInBytes
 
final boolean isGLOriented
 
final ByteBuffer pixels
 

Detailed Description

Generic PixelRectangle implementation.

Definition at line 91 of file PixelRectangle.java.

Constructor & Destructor Documentation

◆ GenericPixelRect() [1/2]

com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.GenericPixelRect ( final PixelFormat  pixelformat,
final DimensionImmutable  size,
int  strideInBytes,
final boolean  isGLOriented,
final ByteBuffer  pixels 
) throws IllegalArgumentException, IndexOutOfBoundsException
Parameters
pixelformat
size
strideInBytesstride in byte-size, i.e. byte count from one line to the next. If not zero, value must be >= width * bytes-per-pixel. If zero, stride is set to width * bytes-per-pixel.
isGLOriented
pixels
Exceptions
IllegalArgumentExceptionif strideInBytes is invalid.
IndexOutOfBoundsExceptionif pixels has insufficient bytes left

Definition at line 112 of file PixelRectangle.java.

Here is the call graph for this function:

◆ GenericPixelRect() [2/2]

com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.GenericPixelRect ( final PixelRectangle  src) throws IllegalArgumentException, IndexOutOfBoundsException

Copy ctor validating src.

Parameters
src
Exceptions
IllegalArgumentExceptionif strideInBytes is invalid.
IndexOutOfBoundsExceptionif pixels has insufficient bytes left

Definition at line 139 of file PixelRectangle.java.

Member Function Documentation

◆ getPixelformat()

PixelFormat com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.getPixelformat ( )

Returns the PixelFormat.

Implements com.jogamp.nativewindow.util.PixelRectangle.

Definition at line 164 of file PixelRectangle.java.

Here is the caller graph for this function:

◆ getPixels()

ByteBuffer com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.getPixels ( )

Returns the pixels.

Implements com.jogamp.nativewindow.util.PixelRectangle.

Definition at line 184 of file PixelRectangle.java.

Here is the caller graph for this function:

◆ getSize()

DimensionImmutable com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.getSize ( )

Returns the size, i.e.

width and height.

Implements com.jogamp.nativewindow.util.PixelRectangle.

Definition at line 169 of file PixelRectangle.java.

Here is the caller graph for this function:

◆ getStride()

int com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.getStride ( )

Returns stride in byte-size, i.e.

byte count from one line to the next.

Must be >= getPixelformat().bytesPerPixel() * getSize().getWidth().

Implements com.jogamp.nativewindow.util.PixelRectangle.

Definition at line 174 of file PixelRectangle.java.

◆ hashCode()

int com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.hashCode ( )

Computes a hash code over:

  • pixelformat
  • size
  • stride
  • isGLOriented
  • pixels

The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.

Computes a hash code over:

  • pixelformat
  • size
  • stride
  • isGLOriented
  • pixels
The hashCode shall be computed only once with first call and stored for later retrieval to enhance performance.

Implements com.jogamp.nativewindow.util.PixelRectangle.

Definition at line 146 of file PixelRectangle.java.

Here is the call graph for this function:

◆ isGLOriented()

boolean com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.isGLOriented ( )

Returns true if the memory is laid out in OpenGL's coordinate system, origin at bottom left.

Otherwise returns false, i.e. origin at top left.

Implements com.jogamp.nativewindow.util.PixelRectangle.

Definition at line 179 of file PixelRectangle.java.

◆ toString()

final String com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.toString ( )

Implements com.jogamp.nativewindow.util.PixelRectangle.

Definition at line 189 of file PixelRectangle.java.

Here is the caller graph for this function:

Member Data Documentation

◆ isGLOriented

final boolean com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.isGLOriented
protected

Definition at line 95 of file PixelRectangle.java.

◆ pixelformat

final PixelFormat com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.pixelformat
protected

Definition at line 92 of file PixelRectangle.java.

◆ pixels

final ByteBuffer com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.pixels
protected

Definition at line 96 of file PixelRectangle.java.

◆ size

final DimensionImmutable com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.size
protected

Definition at line 93 of file PixelRectangle.java.

◆ strideInBytes

final int com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect.strideInBytes
protected

Definition at line 94 of file PixelRectangle.java.


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