Package org.lwjgl.util.spng
Class spng_trns
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct spng_trns {
uint16_t gray;
uint16_t red;
uint16_t green;
uint16_t blue;
uint32_t n_type3_entries;
uint8_t type3_alpha[256];
}-
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 member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionspng_trns(ByteBuffer container) Creates aspng_trnsinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionshortblue()blue(short value) Sets the specified value to thebluefield.static spng_trnscalloc()Returns a newspng_trnsinstance allocated withmemCalloc.static spng_trns.Buffercalloc(int capacity) Returns a newspng_trns.Bufferinstance allocated withmemCalloc.static spng_trns.Buffercalloc(int capacity, MemoryStack stack) Returns a newspng_trns.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_trnscalloc(MemoryStack stack) Returns a newspng_trnsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_trnscreate()Returns a newspng_trnsinstance allocated withBufferUtils.static spng_trns.Buffercreate(int capacity) Returns a newspng_trns.Bufferinstance allocated withBufferUtils.static spng_trnscreate(long address) Returns a newspng_trnsinstance for the specified memory address.static spng_trns.Buffercreate(long address, int capacity) Create aspng_trns.Bufferinstance at the specified memory.static @Nullable spng_trnscreateSafe(long address) static @Nullable spng_trns.BuffercreateSafe(long address, int capacity) shortgray()gray(short value) Sets the specified value to thegrayfield.shortgreen()green(short value) Sets the specified value to thegreenfield.static spng_trnsmalloc()Returns a newspng_trnsinstance allocated withmemAlloc.static spng_trns.Buffermalloc(int capacity) Returns a newspng_trns.Bufferinstance allocated withmemAlloc.static spng_trns.Buffermalloc(int capacity, MemoryStack stack) Returns a newspng_trns.Bufferinstance allocated on the specifiedMemoryStack.static spng_trnsmalloc(MemoryStack stack) Returns a newspng_trnsinstance allocated on the specifiedMemoryStack.intstatic shortnblue(long struct) Unsafe version ofblue().static voidnblue(long struct, short value) Unsafe version ofblue.static shortngray(long struct) Unsafe version ofgray().static voidngray(long struct, short value) Unsafe version ofgray.static shortngreen(long struct) Unsafe version ofgreen().static voidngreen(long struct, short value) Unsafe version ofgreen.static intnn_type3_entries(long struct) Unsafe version ofn_type3_entries().static voidnn_type3_entries(long struct, int value) Sets the specified value to then_type3_entriesfield of the specifiedstruct.static shortnred(long struct) Unsafe version ofred().static voidnred(long struct, short value) Unsafe version ofred.static ByteBufferntype3_alpha(long struct) Unsafe version oftype3_alpha().static bytentype3_alpha(long struct, int index) Unsafe version oftype3_alpha.static voidntype3_alpha(long struct, int index, byte value) Unsafe version oftype3_alpha.static voidntype3_alpha(long struct, ByteBuffer value) Unsafe version oftype3_alpha.shortred()red(short value) Sets the specified value to theredfield.set(short gray, short red, short green, short blue, ByteBuffer type3_alpha) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).bytetype3_alpha(int index) type3_alpha(int index, byte value) Sets the specified value at the specified index of thetype3_alphafield.type3_alpha(ByteBuffer value) Copies the specifiedByteBufferto thetype3_alphafield.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. -
GRAY
public static final int GRAYThe struct member offsets. -
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. -
N_TYPE3_ENTRIES
public static final int N_TYPE3_ENTRIESThe struct member offsets. -
TYPE3_ALPHA
public static final int TYPE3_ALPHAThe struct member offsets.
-
-
Constructor Details
-
spng_trns
Creates aspng_trnsinstance 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). -
gray
public short gray()- Returns:
- the value of the
grayfield.
-
red
public short red()- Returns:
- the value of the
redfield.
-
green
public short green()- Returns:
- the value of the
greenfield.
-
blue
public short blue()- Returns:
- the value of the
bluefield.
-
n_type3_entries
public int n_type3_entries()- Returns:
- the value of the
n_type3_entriesfield.
-
type3_alpha
- Returns:
- a
ByteBufferview of thetype3_alphafield.
-
type3_alpha
public byte type3_alpha(int index) - Returns:
- the value at the specified index of the
type3_alphafield.
-
gray
Sets the specified value to thegrayfield. -
red
Sets the specified value to theredfield. -
green
Sets the specified value to thegreenfield. -
blue
Sets the specified value to thebluefield. -
type3_alpha
Copies the specifiedByteBufferto thetype3_alphafield. -
type3_alpha
Sets the specified value at the specified index of thetype3_alphafield. -
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_trnsinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newspng_trnsinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newspng_trnsinstance allocated withBufferUtils. -
create
Returns a newspng_trnsinstance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_trns.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newspng_trns.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newspng_trns.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aspng_trns.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_trnsinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newspng_trnsinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newspng_trns.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newspng_trns.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ngray
public static short ngray(long struct) Unsafe version ofgray(). -
nred
public static short nred(long struct) Unsafe version ofred(). -
ngreen
public static short ngreen(long struct) Unsafe version ofgreen(). -
nblue
public static short nblue(long struct) Unsafe version ofblue(). -
nn_type3_entries
public static int nn_type3_entries(long struct) Unsafe version ofn_type3_entries(). -
ntype3_alpha
Unsafe version oftype3_alpha(). -
ntype3_alpha
public static byte ntype3_alpha(long struct, int index) Unsafe version oftype3_alpha. -
ngray
public static void ngray(long struct, short value) Unsafe version ofgray. -
nred
public static void nred(long struct, short value) Unsafe version ofred. -
ngreen
public static void ngreen(long struct, short value) Unsafe version ofgreen. -
nblue
public static void nblue(long struct, short value) Unsafe version ofblue. -
nn_type3_entries
public static void nn_type3_entries(long struct, int value) Sets the specified value to then_type3_entriesfield of the specifiedstruct. -
ntype3_alpha
Unsafe version oftype3_alpha. -
ntype3_alpha
public static void ntype3_alpha(long struct, int index, byte value) Unsafe version oftype3_alpha.
-