Package com.jogamp.nativewindow.util
Interface PixelFormat.Composition
-
- All Known Implementing Classes:
PixelFormat.PackedComposition
- Enclosing class:
- PixelFormat
public static interface PixelFormat.CompositionPixel composition, i.e. layout of its components.
-
-
Field Summary
Fields Modifier and Type Field Description static intUNDEF-1
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intbitsPerPixel()Number of bits per pixel, e.g.intbitStride()Bit distance between pixels.intbytesPerPixel()Number of bytes per pixel, i.e.int[]componentBitCount()Returns the number of bits of all components, seecomponentBitMask().int[]componentBitMask()Returns the un-shifted bit-mask of all components.int[]componentBitShift()Returns the bit-shift of all components, seecomponentBitMask().intcomponentCount()Number of components per pixel, e.g.PixelFormat.CType[]componentOrder()Returns theComponent typeorder of all components, seecomponentBitMask().intdecodeSingleI32(int shifted, int cIdx)Decodes a component from the shifted pixel data with abytesPerPixel()of up to 32bit.intdecodeSingleI64(long shifted, int cIdx)Decodes a component from the shifted pixel data with abytesPerPixel()of up to 64bit.intdefaultValue(int cIdx, boolean shiftResult)intencode3CompI32(int c1NormI32, int c2NormI32, int c3NormI32)intencode3CompI8(byte c1NormI8, byte c2NormI8, byte c3NormI8)intencode4CompI32(int c1NormI32, int c2NormI32, int c3NormI32, int c4NormI32)intencode4CompI8(byte c1NormI8, byte c2NormI8, byte c3NormI8, byte c4NormI8)intencodeSingleI32(int norm, int cIdx)longencodeSingleI64(int norm, int cIdx)intencodeSingleI8(byte normalI8, int cIdx)booleanequals(Object o)ReturnsObject.equals(Object)intfind(PixelFormat.CType s)Returns the index of givenPixelFormat.CTypewithincomponentOrder(), -1 if not exists.intfromFloat(float f, int cIdx, boolean shiftResult)inthashCode()Returns cached immutable hash value, seeObject.hashCode().booleanisInterleaved()Returnstrueif all components are packed, i.e.booleanisUniform()Returnstrueif all components are of same bit-size, e.g.floattoFloat(int i32, int cIdx, boolean i32Shifted)StringtoString()ReturnsObject.toString().
-
-
-
Field Detail
-
UNDEF
static final int UNDEF
-1- See Also:
- Constant Field Values
-
-
Method Detail
-
isUniform
boolean isUniform()
-
isInterleaved
boolean isInterleaved()
-
componentCount
int componentCount()
Number of components per pixel, e.g. 3 forRGBx8888.
-
bitsPerPixel
int bitsPerPixel()
Number of bits per pixel, e.g. 24 bits forRGBx8888.
-
bitStride
int bitStride()
Bit distance between pixels.For packed pixels e.g. 32 bits for
RGBx8888.
-
bytesPerPixel
int bytesPerPixel()
Number of bytes per pixel, i.e. packedbitStride()in bytes, e.g. 4 forRGBx8888.
-
componentOrder
PixelFormat.CType[] componentOrder()
Returns theComponent typeorder of all components, seecomponentBitMask().
-
find
int find(PixelFormat.CType s)
Returns the index of givenPixelFormat.CTypewithincomponentOrder(), -1 if not exists.
-
componentBitMask
int[] componentBitMask()
-
componentBitCount
int[] componentBitCount()
Returns the number of bits of all components, seecomponentBitMask().
-
componentBitShift
int[] componentBitShift()
Returns the bit-shift of all components, seecomponentBitMask().
-
decodeSingleI32
int decodeSingleI32(int shifted, int cIdx)Decodes a component from the shifted pixel data with abytesPerPixel()of up to 32bit.- Parameters:
shifted- complete pixel encoded into on 32bit integercIdx- the desired component index- Returns:
- the decoded component value
-
decodeSingleI64
int decodeSingleI64(long shifted, int cIdx)Decodes a component from the shifted pixel data with abytesPerPixel()of up to 64bit.- Parameters:
shifted- complete pixel encoded into on 64bit integercIdx- the desired component index- Returns:
- the decoded component value
-
encodeSingleI32
int encodeSingleI32(int norm, int cIdx)
-
encodeSingleI64
long encodeSingleI64(int norm, int cIdx)
-
encode3CompI32
int encode3CompI32(int c1NormI32, int c2NormI32, int c3NormI32)
-
encode4CompI32
int encode4CompI32(int c1NormI32, int c2NormI32, int c3NormI32, int c4NormI32)
-
encodeSingleI8
int encodeSingleI8(byte normalI8, int cIdx)
-
encode3CompI8
int encode3CompI8(byte c1NormI8, byte c2NormI8, byte c3NormI8)
-
encode4CompI8
int encode4CompI8(byte c1NormI8, byte c2NormI8, byte c3NormI8, byte c4NormI8)
-
toFloat
float toFloat(int i32, int cIdx, boolean i32Shifted)
-
fromFloat
int fromFloat(float f, int cIdx, boolean shiftResult)
-
defaultValue
int defaultValue(int cIdx, boolean shiftResult)
-
hashCode
int hashCode()
Returns cached immutable hash value, seeObject.hashCode().
-
equals
boolean equals(Object o)
ReturnsObject.equals(Object)
-
toString
String toString()
ReturnsObject.toString().
-
-