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.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 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_ihdr(ByteBuffer container) Creates aspng_ihdrinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionbytebit_depth(byte value) Sets the specified value to thebit_depthfield.static spng_ihdrcalloc()Returns a newspng_ihdrinstance allocated withmemCalloc.static spng_ihdr.Buffercalloc(int capacity) Returns a newspng_ihdr.Bufferinstance allocated withmemCalloc.static spng_ihdr.Buffercalloc(int capacity, MemoryStack stack) Returns a newspng_ihdr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static spng_ihdrcalloc(MemoryStack stack) Returns a newspng_ihdrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.bytecolor_type(byte value) Sets the specified value to thecolor_typefield.bytecompression_method(byte value) Sets the specified value to thecompression_methodfield.static spng_ihdrcreate()Returns a newspng_ihdrinstance allocated withBufferUtils.static spng_ihdr.Buffercreate(int capacity) Returns a newspng_ihdr.Bufferinstance allocated withBufferUtils.static spng_ihdrcreate(long address) Returns a newspng_ihdrinstance for the specified memory address.static spng_ihdr.Buffercreate(long address, int capacity) Create aspng_ihdr.Bufferinstance at the specified memory.static @Nullable spng_ihdrcreateSafe(long address) static @Nullable spng_ihdr.BuffercreateSafe(long address, int capacity) bytefilter_method(byte value) Sets the specified value to thefilter_methodfield.intheight()height(int value) Sets the specified value to theheightfield.byteinterlace_method(byte value) Sets the specified value to theinterlace_methodfield.static spng_ihdrmalloc()Returns a newspng_ihdrinstance allocated withmemAlloc.static spng_ihdr.Buffermalloc(int capacity) Returns a newspng_ihdr.Bufferinstance allocated withmemAlloc.static spng_ihdr.Buffermalloc(int capacity, MemoryStack stack) Returns a newspng_ihdr.Bufferinstance allocated on the specifiedMemoryStack.static spng_ihdrmalloc(MemoryStack stack) Returns a newspng_ihdrinstance allocated on the specifiedMemoryStack.static bytenbit_depth(long struct) Unsafe version ofbit_depth().static voidnbit_depth(long struct, byte value) Unsafe version ofbit_depth.static bytencolor_type(long struct) Unsafe version ofcolor_type().static voidncolor_type(long struct, byte value) Unsafe version ofcolor_type.static bytencompression_method(long struct) Unsafe version ofcompression_method().static voidncompression_method(long struct, byte value) Unsafe version ofcompression_method.static bytenfilter_method(long struct) Unsafe version offilter_method().static voidnfilter_method(long struct, byte value) Unsafe version offilter_method.static intnheight(long struct) Unsafe version ofheight().static voidnheight(long struct, int value) Unsafe version ofheight.static byteninterlace_method(long struct) Unsafe version ofinterlace_method().static voidninterlace_method(long struct, byte value) Unsafe version ofinterlace_method.static intnwidth(long struct) Unsafe version ofwidth().static voidnwidth(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.intsizeof()Returnssizeof(struct).intwidth()width(int value) Sets the specified value to thewidthfield.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. -
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_ihdrinstance 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). -
width
public int width()- Returns:
- the value of the
widthfield.
-
height
public int height()- Returns:
- the value of the
heightfield.
-
bit_depth
public byte bit_depth()- Returns:
- the value of the
bit_depthfield.
-
color_type
public byte color_type()- Returns:
- the value of the
color_typefield.
-
compression_method
public byte compression_method()- Returns:
- the value of the
compression_methodfield.
-
filter_method
public byte filter_method()- Returns:
- the value of the
filter_methodfield.
-
interlace_method
public byte interlace_method()- Returns:
- the value of the
interlace_methodfield.
-
width
Sets the specified value to thewidthfield. -
height
Sets the specified value to theheightfield. -
bit_depth
Sets the specified value to thebit_depthfield. -
color_type
Sets the specified value to thecolor_typefield. -
compression_method
Sets the specified value to thecompression_methodfield. -
filter_method
Sets the specified value to thefilter_methodfield. -
interlace_method
Sets the specified value to theinterlace_methodfield. -
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_ihdrinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newspng_ihdrinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newspng_ihdrinstance allocated withBufferUtils. -
create
Returns a newspng_ihdrinstance for the specified memory address. -
createSafe
-
malloc
Returns a newspng_ihdr.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newspng_ihdr.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newspng_ihdr.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aspng_ihdr.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newspng_ihdrinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newspng_ihdrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newspng_ihdr.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newspng_ihdr.Bufferinstance allocated on the specifiedMemoryStackand 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.
-