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

Pixel composition, i.e. More...

Inheritance diagram for com.jogamp.nativewindow.util.PixelFormat.Composition:
Collaboration diagram for com.jogamp.nativewindow.util.PixelFormat.Composition:

Public Member Functions

boolean isUniform ()
 Returns true if all components are of same bit-size, e.g. More...
 
boolean isInterleaved ()
 Returns true if all components are packed, i.e. More...
 
int componentCount ()
 Number of components per pixel, e.g. More...
 
int bitsPerPixel ()
 Number of bits per pixel, e.g. More...
 
int bitStride ()
 Bit distance between pixels. More...
 
int bytesPerPixel ()
 Number of bytes per pixel, i.e. More...
 
CType[] componentOrder ()
 Returns the Component type order of all components, see componentBitMask(). More...
 
int find (final PixelFormat.CType s)
 Returns the index of given CType within componentOrder(), -1 if not exists. More...
 
int[] componentBitMask ()
 Returns the un-shifted bit-mask of all components. More...
 
int[] componentBitCount ()
 Returns the number of bits of all components, see componentBitMask(). More...
 
int[] componentBitShift ()
 Returns the bit-shift of all components, see componentBitMask(). More...
 
int decodeSingleI32 (final int shifted, final int cIdx)
 Decodes a component from the shifted pixel data with a bytesPerPixel() of up to 32bit. More...
 
int decodeSingleI64 (final long shifted, final int cIdx)
 Decodes a component from the shifted pixel data with a bytesPerPixel() of up to 64bit. More...
 
int encodeSingleI32 (final int norm, final int cIdx)
 
long encodeSingleI64 (final int norm, final int cIdx)
 
int encode3CompI32 (final int c1NormI32, final int c2NormI32, final int c3NormI32)
 
int encode4CompI32 (final int c1NormI32, final int c2NormI32, final int c3NormI32, final int c4NormI32)
 
int encodeSingleI8 (final byte normalI8, final int cIdx)
 
int encode3CompI8 (final byte c1NormI8, final byte c2NormI8, final byte c3NormI8)
 
int encode4CompI8 (final byte c1NormI8, final byte c2NormI8, final byte c3NormI8, final byte c4NormI8)
 
float toFloat (final int i32, final int cIdx, final boolean i32Shifted)
 
int fromFloat (final float f, final int cIdx, final boolean shiftResult)
 
int defaultValue (final int cIdx, final boolean shiftResult)
 
int hashCode ()
 Returns cached immutable hash value, see Object#hashCode(). More...
 
boolean equals (final Object o)
 Returns Object#equals(Object). More...
 
String toString ()
 Returns Object#toString(). More...
 

Static Public Attributes

static final int UNDEF = -1
 {@value} More...
 

Detailed Description

Pixel composition, i.e.

layout of its components.

Definition at line 411 of file PixelFormat.java.

Member Function Documentation

◆ bitsPerPixel()

int com.jogamp.nativewindow.util.PixelFormat.Composition.bitsPerPixel ( )

Number of bits per pixel, e.g.

24 bits for RGBx8888.

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ bitStride()

int com.jogamp.nativewindow.util.PixelFormat.Composition.bitStride ( )

Bit distance between pixels.

For packed pixels e.g. 32 bits for RGBx8888.

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ bytesPerPixel()

int com.jogamp.nativewindow.util.PixelFormat.Composition.bytesPerPixel ( )

Number of bytes per pixel, i.e.

packed bitStride() in bytes, e.g. 4 for RGBx8888.

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

Here is the caller graph for this function:

◆ componentBitCount()

int[] com.jogamp.nativewindow.util.PixelFormat.Composition.componentBitCount ( )

Returns the number of bits of all components, see componentBitMask().

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ componentBitMask()

int[] com.jogamp.nativewindow.util.PixelFormat.Composition.componentBitMask ( )

Returns the un-shifted bit-mask of all components.

Components mask is returned in the order Low-Index to High-Index, e.g.:

  • RGB565: 0: R 0x1F, 1: G 0x3F, 2: B 0x1F
  • RGBA5551: 0: R 0x1F, 1: G 0x1F, 2: B 0x1F, 3: A 0x01
  • RGBA8888: 0: R 0xFF, 1: G 0xFF, 2: B 0xFF, 3: A 0xFF

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ componentBitShift()

int[] com.jogamp.nativewindow.util.PixelFormat.Composition.componentBitShift ( )

Returns the bit-shift of all components, see componentBitMask().

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ componentCount()

int com.jogamp.nativewindow.util.PixelFormat.Composition.componentCount ( )

Number of components per pixel, e.g.

3 for RGBx8888.

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

Here is the caller graph for this function:

◆ componentOrder()

CType[] com.jogamp.nativewindow.util.PixelFormat.Composition.componentOrder ( )

Returns the Component type order of all components, see componentBitMask().

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ decodeSingleI32()

int com.jogamp.nativewindow.util.PixelFormat.Composition.decodeSingleI32 ( final int  shifted,
final int  cIdx 
)

Decodes a component from the shifted pixel data with a bytesPerPixel() of up to 32bit.

Parameters
shiftedcomplete pixel encoded into on 32bit integer
cIdxthe desired component index
Returns
the decoded component value

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ decodeSingleI64()

int com.jogamp.nativewindow.util.PixelFormat.Composition.decodeSingleI64 ( final long  shifted,
final int  cIdx 
)

Decodes a component from the shifted pixel data with a bytesPerPixel() of up to 64bit.

Parameters
shiftedcomplete pixel encoded into on 64bit integer
cIdxthe desired component index
Returns
the decoded component value

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ defaultValue()

int com.jogamp.nativewindow.util.PixelFormat.Composition.defaultValue ( final int  cIdx,
final boolean  shiftResult 
)

◆ encode3CompI32()

int com.jogamp.nativewindow.util.PixelFormat.Composition.encode3CompI32 ( final int  c1NormI32,
final int  c2NormI32,
final int  c3NormI32 
)

◆ encode3CompI8()

int com.jogamp.nativewindow.util.PixelFormat.Composition.encode3CompI8 ( final byte  c1NormI8,
final byte  c2NormI8,
final byte  c3NormI8 
)

◆ encode4CompI32()

int com.jogamp.nativewindow.util.PixelFormat.Composition.encode4CompI32 ( final int  c1NormI32,
final int  c2NormI32,
final int  c3NormI32,
final int  c4NormI32 
)

◆ encode4CompI8()

int com.jogamp.nativewindow.util.PixelFormat.Composition.encode4CompI8 ( final byte  c1NormI8,
final byte  c2NormI8,
final byte  c3NormI8,
final byte  c4NormI8 
)

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

Here is the caller graph for this function:

◆ encodeSingleI32()

int com.jogamp.nativewindow.util.PixelFormat.Composition.encodeSingleI32 ( final int  norm,
final int  cIdx 
)

◆ encodeSingleI64()

long com.jogamp.nativewindow.util.PixelFormat.Composition.encodeSingleI64 ( final int  norm,
final int  cIdx 
)

◆ encodeSingleI8()

int com.jogamp.nativewindow.util.PixelFormat.Composition.encodeSingleI8 ( final byte  normalI8,
final int  cIdx 
)

◆ equals()

boolean com.jogamp.nativewindow.util.PixelFormat.Composition.equals ( final Object  o)

Returns Object#equals(Object).

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

Here is the caller graph for this function:

◆ find()

int com.jogamp.nativewindow.util.PixelFormat.Composition.find ( final PixelFormat.CType  s)

Returns the index of given CType within componentOrder(), -1 if not exists.

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

Here is the caller graph for this function:

◆ fromFloat()

int com.jogamp.nativewindow.util.PixelFormat.Composition.fromFloat ( final float  f,
final int  cIdx,
final boolean  shiftResult 
)

◆ hashCode()

int com.jogamp.nativewindow.util.PixelFormat.Composition.hashCode ( )

Returns cached immutable hash value, see Object#hashCode().

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

Here is the caller graph for this function:

◆ isInterleaved()

boolean com.jogamp.nativewindow.util.PixelFormat.Composition.isInterleaved ( )

Returns true if all components are packed, i.e.

interleaved, e.g. RGBA8888, otherwise false.

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ isUniform()

boolean com.jogamp.nativewindow.util.PixelFormat.Composition.isUniform ( )

Returns true if all components are of same bit-size, e.g.

RGBA8888, otherwise false, e.g. RGBA5551

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

◆ toFloat()

float com.jogamp.nativewindow.util.PixelFormat.Composition.toFloat ( final int  i32,
final int  cIdx,
final boolean  i32Shifted 
)

Implemented in com.jogamp.nativewindow.util.PixelFormat.PackedComposition.

Here is the caller graph for this function:

◆ toString()

String com.jogamp.nativewindow.util.PixelFormat.Composition.toString ( )

Member Data Documentation

◆ UNDEF

final int com.jogamp.nativewindow.util.PixelFormat.Composition.UNDEF = -1
static

{@value}

Definition at line 413 of file PixelFormat.java.


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