Package org.lwjgl.util.spng
Class spng_plte_entry
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct spng_plte_entry {
uint8_t red;
uint8_t green;
uint8_t blue;
uint8_t alpha;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionspng_plte_entry(ByteBuffer container) Creates aspng_plte_entryinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbytealpha()alpha(byte value) Sets the specified value to thealphafield.byteblue()blue(byte value) Sets the specified value to thebluefield.static spng_plte_entrycalloc()Returns a newspng_plte_entryinstance allocated withmemCalloc.static spng_plte_entry.Buffercalloc(int capacity) Returns a newspng_plte_entry.Bufferinstance allocated withmemCalloc.static spng_plte_entry.Buffercalloc(int capacity, MemoryStack stack) Returns a newspng_plte_entry.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_plte_entrycalloc(MemoryStack stack) Returns a newspng_plte_entryinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_plte_entrycreate()Returns a newspng_plte_entryinstance allocated withBufferUtils.static spng_plte_entry.Buffercreate(int capacity) Returns a newspng_plte_entry.Bufferinstance allocated withBufferUtils.static spng_plte_entrycreate(long address) Returns a newspng_plte_entryinstance for the specified memory address.static spng_plte_entry.Buffercreate(long address, int capacity) Create aspng_plte_entry.Bufferinstance at the specified memory.static @Nullable spng_plte_entrycreateSafe(long address) static @Nullable spng_plte_entry.BuffercreateSafe(long address, int capacity) bytegreen()green(byte value) Sets the specified value to thegreenfield.static spng_plte_entrymalloc()Returns a newspng_plte_entryinstance allocated withmemAlloc.static spng_plte_entry.Buffermalloc(int capacity) Returns a newspng_plte_entry.Bufferinstance allocated withmemAlloc.static spng_plte_entry.Buffermalloc(int capacity, MemoryStack stack) Returns a newspng_plte_entry.Bufferinstance allocated on the specifiedMemoryStack.static spng_plte_entrymalloc(MemoryStack stack) Returns a newspng_plte_entryinstance allocated on the specifiedMemoryStack.static bytenalpha(long struct) Unsafe version ofalpha().static voidnalpha(long struct, byte value) Unsafe version ofalpha.static bytenblue(long struct) Unsafe version ofblue().static voidnblue(long struct, byte value) Unsafe version ofblue.static bytengreen(long struct) Unsafe version ofgreen().static voidngreen(long struct, byte value) Unsafe version ofgreen.static bytenred(long struct) Unsafe version ofred().static voidnred(long struct, byte value) Unsafe version ofred.bytered()red(byte value) Sets the specified value to theredfield.set(byte red, byte green, byte blue, byte alpha) Initializes this struct with the specified values.set(spng_plte_entry src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
RED
public static final int REDThe struct member offsets. -
GREEN
public static final int GREENThe struct member offsets. -
BLUE
public static final int BLUEThe struct member offsets. -
ALPHA
public static final int ALPHAThe struct member offsets.
-
-
Constructor Details
-
spng_plte_entry
Creates aspng_plte_entryinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<spng_plte_entry>
-
red
public byte red()- Returns:
- the value of the
redfield.
-
green
public byte green()- Returns:
- the value of the
greenfield.
-
blue
public byte blue()- Returns:
- the value of the
bluefield.
-
alpha
public byte alpha()- Returns:
- the value of the
alphafield.
-
red
Sets the specified value to theredfield. -
green
Sets the specified value to thegreenfield. -
blue
Sets the specified value to thebluefield. -
alpha
Sets the specified value to thealphafield. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newspng_plte_entryinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newspng_plte_entryinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newspng_plte_entryinstance allocated withBufferUtils. -
create
Returns a newspng_plte_entryinstance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_plte_entry.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newspng_plte_entry.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newspng_plte_entry.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aspng_plte_entry.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_plte_entryinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newspng_plte_entryinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newspng_plte_entry.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newspng_plte_entry.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nred
public static byte nred(long struct) Unsafe version ofred(). -
ngreen
public static byte ngreen(long struct) Unsafe version ofgreen(). -
nblue
public static byte nblue(long struct) Unsafe version ofblue(). -
nalpha
public static byte nalpha(long struct) Unsafe version ofalpha(). -
nred
public static void nred(long struct, byte value) Unsafe version ofred. -
ngreen
public static void ngreen(long struct, byte value) Unsafe version ofgreen. -
nblue
public static void nblue(long struct, byte value) Unsafe version ofblue. -
nalpha
public static void nalpha(long struct, byte value) Unsafe version ofalpha.
-