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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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_entry
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionbyte
alpha()
alpha
(byte value) Sets the specified value to thealpha
field.byte
blue()
blue
(byte value) Sets the specified value to theblue
field.static spng_plte_entry
calloc()
Returns a newspng_plte_entry
instance allocated withmemCalloc
.static spng_plte_entry.Buffer
calloc
(int capacity) Returns a newspng_plte_entry.Buffer
instance allocated withmemCalloc
.static spng_plte_entry.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newspng_plte_entry.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static spng_plte_entry
calloc
(MemoryStack stack) Returns a newspng_plte_entry
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static spng_plte_entry
create()
Returns a newspng_plte_entry
instance allocated withBufferUtils
.static spng_plte_entry.Buffer
create
(int capacity) Returns a newspng_plte_entry.Buffer
instance allocated withBufferUtils
.static spng_plte_entry
create
(long address) Returns a newspng_plte_entry
instance for the specified memory address.static spng_plte_entry.Buffer
create
(long address, int capacity) Create aspng_plte_entry.Buffer
instance at the specified memory.static @Nullable spng_plte_entry
createSafe
(long address) static @Nullable spng_plte_entry.Buffer
createSafe
(long address, int capacity) byte
green()
green
(byte value) Sets the specified value to thegreen
field.static spng_plte_entry
malloc()
Returns a newspng_plte_entry
instance allocated withmemAlloc
.static spng_plte_entry.Buffer
malloc
(int capacity) Returns a newspng_plte_entry.Buffer
instance allocated withmemAlloc
.static spng_plte_entry.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newspng_plte_entry.Buffer
instance allocated on the specifiedMemoryStack
.static spng_plte_entry
malloc
(MemoryStack stack) Returns a newspng_plte_entry
instance allocated on the specifiedMemoryStack
.static byte
nalpha
(long struct) Unsafe version ofalpha()
.static void
nalpha
(long struct, byte value) Unsafe version ofalpha
.static byte
nblue
(long struct) Unsafe version ofblue()
.static void
nblue
(long struct, byte value) Unsafe version ofblue
.static byte
ngreen
(long struct) Unsafe version ofgreen()
.static void
ngreen
(long struct, byte value) Unsafe version ofgreen
.static byte
nred
(long struct) Unsafe version ofred()
.static void
nred
(long struct, byte value) Unsafe version ofred
.byte
red()
red
(byte value) Sets the specified value to thered
field.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.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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_entry
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<spng_plte_entry>
-
red
public byte red()- Returns:
- the value of the
red
field.
-
green
public byte green()- Returns:
- the value of the
green
field.
-
blue
public byte blue()- Returns:
- the value of the
blue
field.
-
alpha
public byte alpha()- Returns:
- the value of the
alpha
field.
-
red
Sets the specified value to thered
field. -
green
Sets the specified value to thegreen
field. -
blue
Sets the specified value to theblue
field. -
alpha
Sets the specified value to thealpha
field. -
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_entry
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newspng_plte_entry
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newspng_plte_entry
instance allocated withBufferUtils
. -
create
Returns a newspng_plte_entry
instance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_plte_entry.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newspng_plte_entry.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newspng_plte_entry.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aspng_plte_entry.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_plte_entry
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newspng_plte_entry
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newspng_plte_entry.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newspng_plte_entry.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-