Package org.lwjgl.util.spng
Class spng_ihdr
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
struct spng_ihdr {
uint32_t width;
uint32_t height;
uint8_t bit_depth;
uint8_t color_type;
uint8_t compression_method;
uint8_t filter_method;
uint8_t interlace_method;
}
-
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 member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionspng_ihdr
(ByteBuffer container) Creates aspng_ihdr
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionbyte
bit_depth
(byte value) Sets the specified value to thebit_depth
field.static spng_ihdr
calloc()
Returns a newspng_ihdr
instance allocated withmemCalloc
.static spng_ihdr.Buffer
calloc
(int capacity) Returns a newspng_ihdr.Buffer
instance allocated withmemCalloc
.static spng_ihdr.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newspng_ihdr.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static spng_ihdr
calloc
(MemoryStack stack) Returns a newspng_ihdr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.byte
color_type
(byte value) Sets the specified value to thecolor_type
field.byte
compression_method
(byte value) Sets the specified value to thecompression_method
field.static spng_ihdr
create()
Returns a newspng_ihdr
instance allocated withBufferUtils
.static spng_ihdr.Buffer
create
(int capacity) Returns a newspng_ihdr.Buffer
instance allocated withBufferUtils
.static spng_ihdr
create
(long address) Returns a newspng_ihdr
instance for the specified memory address.static spng_ihdr.Buffer
create
(long address, int capacity) Create aspng_ihdr.Buffer
instance at the specified memory.static @Nullable spng_ihdr
createSafe
(long address) static @Nullable spng_ihdr.Buffer
createSafe
(long address, int capacity) byte
filter_method
(byte value) Sets the specified value to thefilter_method
field.int
height()
height
(int value) Sets the specified value to theheight
field.byte
interlace_method
(byte value) Sets the specified value to theinterlace_method
field.static spng_ihdr
malloc()
Returns a newspng_ihdr
instance allocated withmemAlloc
.static spng_ihdr.Buffer
malloc
(int capacity) Returns a newspng_ihdr.Buffer
instance allocated withmemAlloc
.static spng_ihdr.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newspng_ihdr.Buffer
instance allocated on the specifiedMemoryStack
.static spng_ihdr
malloc
(MemoryStack stack) Returns a newspng_ihdr
instance allocated on the specifiedMemoryStack
.static byte
nbit_depth
(long struct) Unsafe version ofbit_depth()
.static void
nbit_depth
(long struct, byte value) Unsafe version ofbit_depth
.static byte
ncolor_type
(long struct) Unsafe version ofcolor_type()
.static void
ncolor_type
(long struct, byte value) Unsafe version ofcolor_type
.static byte
ncompression_method
(long struct) Unsafe version ofcompression_method()
.static void
ncompression_method
(long struct, byte value) Unsafe version ofcompression_method
.static byte
nfilter_method
(long struct) Unsafe version offilter_method()
.static void
nfilter_method
(long struct, byte value) Unsafe version offilter_method
.static int
nheight
(long struct) Unsafe version ofheight()
.static void
nheight
(long struct, int value) Unsafe version ofheight
.static byte
ninterlace_method
(long struct) Unsafe version ofinterlace_method()
.static void
ninterlace_method
(long struct, byte value) Unsafe version ofinterlace_method
.static int
nwidth
(long struct) Unsafe version ofwidth()
.static void
nwidth
(long struct, int value) Unsafe version ofwidth
.set
(int width, int height, byte bit_depth, byte color_type, byte compression_method, byte filter_method, byte interlace_method) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
width()
width
(int value) Sets the specified value to thewidth
field.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. -
WIDTH
public static final int WIDTHThe struct member offsets. -
HEIGHT
public static final int HEIGHTThe struct member offsets. -
BIT_DEPTH
public static final int BIT_DEPTHThe struct member offsets. -
COLOR_TYPE
public static final int COLOR_TYPEThe struct member offsets. -
COMPRESSION_METHOD
public static final int COMPRESSION_METHODThe struct member offsets. -
FILTER_METHOD
public static final int FILTER_METHODThe struct member offsets. -
INTERLACE_METHOD
public static final int INTERLACE_METHODThe struct member offsets.
-
-
Constructor Details
-
spng_ihdr
Creates aspng_ihdr
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)
. -
width
public int width()- Returns:
- the value of the
width
field.
-
height
public int height()- Returns:
- the value of the
height
field.
-
bit_depth
public byte bit_depth()- Returns:
- the value of the
bit_depth
field.
-
color_type
public byte color_type()- Returns:
- the value of the
color_type
field.
-
compression_method
public byte compression_method()- Returns:
- the value of the
compression_method
field.
-
filter_method
public byte filter_method()- Returns:
- the value of the
filter_method
field.
-
interlace_method
public byte interlace_method()- Returns:
- the value of the
interlace_method
field.
-
width
Sets the specified value to thewidth
field. -
height
Sets the specified value to theheight
field. -
bit_depth
Sets the specified value to thebit_depth
field. -
color_type
Sets the specified value to thecolor_type
field. -
compression_method
Sets the specified value to thecompression_method
field. -
filter_method
Sets the specified value to thefilter_method
field. -
interlace_method
Sets the specified value to theinterlace_method
field. -
set
public spng_ihdr set(int width, int height, byte bit_depth, byte color_type, byte compression_method, byte filter_method, byte interlace_method) 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_ihdr
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newspng_ihdr
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newspng_ihdr
instance allocated withBufferUtils
. -
create
Returns a newspng_ihdr
instance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_ihdr.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newspng_ihdr.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newspng_ihdr.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aspng_ihdr.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_ihdr
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newspng_ihdr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newspng_ihdr.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newspng_ihdr.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nwidth
public static int nwidth(long struct) Unsafe version ofwidth()
. -
nheight
public static int nheight(long struct) Unsafe version ofheight()
. -
nbit_depth
public static byte nbit_depth(long struct) Unsafe version ofbit_depth()
. -
ncolor_type
public static byte ncolor_type(long struct) Unsafe version ofcolor_type()
. -
ncompression_method
public static byte ncompression_method(long struct) Unsafe version ofcompression_method()
. -
nfilter_method
public static byte nfilter_method(long struct) Unsafe version offilter_method()
. -
ninterlace_method
public static byte ninterlace_method(long struct) Unsafe version ofinterlace_method()
. -
nwidth
public static void nwidth(long struct, int value) Unsafe version ofwidth
. -
nheight
public static void nheight(long struct, int value) Unsafe version ofheight
. -
nbit_depth
public static void nbit_depth(long struct, byte value) Unsafe version ofbit_depth
. -
ncolor_type
public static void ncolor_type(long struct, byte value) Unsafe version ofcolor_type
. -
ncompression_method
public static void ncompression_method(long struct, byte value) Unsafe version ofcompression_method
. -
nfilter_method
public static void nfilter_method(long struct, byte value) Unsafe version offilter_method
. -
ninterlace_method
public static void ninterlace_method(long struct, byte value) Unsafe version ofinterlace_method
.
-