Package org.lwjgl.stb
Class STBTTPackContext
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
An opaque structure which holds all the context needed from
PackBegin
to PackEnd
.
Layout
struct stbtt_pack_context {
void * user_allocator_context;
stbrp_context
* pack_info;
int width;
int height;
int stride_in_bytes;
int padding;
int skip_missing;
unsigned int h_oversample;
unsigned int v_oversample;
unsigned char * pixels;
stbrp_node
* nodes;
}
-
Nested Class Summary
Nested 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
Modifier 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.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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionSTBTTPackContext
(ByteBuffer container) Creates aSTBTTPackContext
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTTPackContext
calloc()
Returns a newSTBTTPackContext
instance allocated withmemCalloc
.static STBTTPackContext.Buffer
calloc
(int capacity) Returns a newSTBTTPackContext.Buffer
instance allocated withmemCalloc
.static STBTTPackContext.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newSTBTTPackContext.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTPackContext
calloc
(MemoryStack stack) Returns a newSTBTTPackContext
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static STBTTPackContext
Deprecated.static STBTTPackContext.Buffer
callocStack
(int capacity) Deprecated.static STBTTPackContext.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static STBTTPackContext
callocStack
(MemoryStack stack) Deprecated.static STBTTPackContext
create()
Returns a newSTBTTPackContext
instance allocated withBufferUtils
.static STBTTPackContext.Buffer
create
(int capacity) Returns a newSTBTTPackContext.Buffer
instance allocated withBufferUtils
.static STBTTPackContext
create
(long address) Returns a newSTBTTPackContext
instance for the specified memory address.static STBTTPackContext.Buffer
create
(long address, int capacity) Create aSTBTTPackContext.Buffer
instance at the specified memory.static STBTTPackContext
createSafe
(long address) static STBTTPackContext.Buffer
createSafe
(long address, int capacity) int
int
height()
static STBTTPackContext
malloc()
Returns a newSTBTTPackContext
instance allocated withmemAlloc
.static STBTTPackContext.Buffer
malloc
(int capacity) Returns a newSTBTTPackContext.Buffer
instance allocated withmemAlloc
.static STBTTPackContext.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newSTBTTPackContext.Buffer
instance allocated on the specifiedMemoryStack
.static STBTTPackContext
malloc
(MemoryStack stack) Returns a newSTBTTPackContext
instance allocated on the specifiedMemoryStack
.static STBTTPackContext
Deprecated.static STBTTPackContext.Buffer
mallocStack
(int capacity) Deprecated.static STBTTPackContext.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static STBTTPackContext
mallocStack
(MemoryStack stack) Deprecated.static int
nh_oversample
(long struct) Unsafe version ofh_oversample()
.static int
nheight
(long struct) Unsafe version ofheight()
.static STBRPNode.Buffer
nnodes
(long struct, int capacity) Unsafe version ofnodes(int)
.nodes
(int capacity) static STBRPContext
npack_info
(long struct) Unsafe version ofpack_info()
.static int
npadding
(long struct) Unsafe version ofpadding()
.static ByteBuffer
npixels
(long struct, int capacity) Unsafe version ofpixels
.static int
nskip_missing
(long struct) Unsafe version ofskip_missing()
.static int
nstride_in_bytes
(long struct) Unsafe version ofstride_in_bytes()
.static long
nuser_allocator_context
(long struct) Unsafe version ofuser_allocator_context()
.static int
nv_oversample
(long struct) Unsafe version ofv_oversample()
.static int
nwidth
(long struct) Unsafe version ofwidth()
.int
padding()
pixels
(int capacity) int
sizeof()
Returnssizeof(struct)
.boolean
int
long
int
int
width()
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. -
USER_ALLOCATOR_CONTEXT
public static final int USER_ALLOCATOR_CONTEXTThe struct member offsets. -
PACK_INFO
public static final int PACK_INFOThe struct member offsets. -
WIDTH
public static final int WIDTHThe struct member offsets. -
HEIGHT
public static final int HEIGHTThe struct member offsets. -
STRIDE_IN_BYTES
public static final int STRIDE_IN_BYTESThe struct member offsets. -
PADDING
public static final int PADDINGThe struct member offsets. -
SKIP_MISSING
public static final int SKIP_MISSINGThe struct member offsets. -
H_OVERSAMPLE
public static final int H_OVERSAMPLEThe struct member offsets. -
V_OVERSAMPLE
public static final int V_OVERSAMPLEThe struct member offsets. -
PIXELS
public static final int PIXELSThe struct member offsets. -
NODES
public static final int NODESThe struct member offsets.
-
-
Constructor Details
-
STBTTPackContext
Creates aSTBTTPackContext
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<STBTTPackContext>
-
user_allocator_context
public long user_allocator_context()- Returns:
- the value of the
user_allocator_context
field.
-
pack_info
- Returns:
- a
STBRPContext
view of the struct pointed to by thepack_info
field.
-
width
public int width()- Returns:
- the value of the
width
field.
-
height
public int height()- Returns:
- the value of the
height
field.
-
stride_in_bytes
public int stride_in_bytes()- Returns:
- the value of the
stride_in_bytes
field.
-
padding
public int padding()- Returns:
- the value of the
padding
field.
-
skip_missing
public boolean skip_missing()- Returns:
- the value of the
skip_missing
field.
-
h_oversample
public int h_oversample()- Returns:
- the value of the
h_oversample
field.
-
v_oversample
public int v_oversample()- Returns:
- the value of the
v_oversample
field.
-
pixels
- Parameters:
capacity
- the number of elements in the returned buffer- Returns:
- a
ByteBuffer
view of the data pointed to by thepixels
field.
-
nodes
- Parameters:
capacity
- the number of elements in the returned buffer- Returns:
- a
STBRPNode.Buffer
view of the struct array pointed to by thenodes
field.
-
malloc
Returns a newSTBTTPackContext
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newSTBTTPackContext
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newSTBTTPackContext
instance allocated withBufferUtils
. -
create
Returns a newSTBTTPackContext
instance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBTTPackContext.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newSTBTTPackContext.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newSTBTTPackContext.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aSTBTTPackContext.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newSTBTTPackContext
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newSTBTTPackContext
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newSTBTTPackContext.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newSTBTTPackContext.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nuser_allocator_context
public static long nuser_allocator_context(long struct) Unsafe version ofuser_allocator_context()
. -
npack_info
Unsafe version ofpack_info()
. -
nwidth
public static int nwidth(long struct) Unsafe version ofwidth()
. -
nheight
public static int nheight(long struct) Unsafe version ofheight()
. -
nstride_in_bytes
public static int nstride_in_bytes(long struct) Unsafe version ofstride_in_bytes()
. -
npadding
public static int npadding(long struct) Unsafe version ofpadding()
. -
nskip_missing
public static int nskip_missing(long struct) Unsafe version ofskip_missing()
. -
nh_oversample
public static int nh_oversample(long struct) Unsafe version ofh_oversample()
. -
nv_oversample
public static int nv_oversample(long struct) Unsafe version ofv_oversample()
. -
npixels
Unsafe version ofpixels
. -
nnodes
Unsafe version ofnodes(int)
.
-