Package org.lwjgl.stb
Class STBTTPackContext
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
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 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.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.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
ConstructorsConstructorDescriptionSTBTTPackContext(ByteBuffer container) Creates aSTBTTPackContextinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTTPackContextcalloc()Returns a newSTBTTPackContextinstance allocated withmemCalloc.static STBTTPackContext.Buffercalloc(int capacity) Returns a newSTBTTPackContext.Bufferinstance allocated withmemCalloc.static STBTTPackContext.Buffercalloc(int capacity, MemoryStack stack) Returns a newSTBTTPackContext.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackContextcalloc(MemoryStack stack) Returns a newSTBTTPackContextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTPackContextcreate()Returns a newSTBTTPackContextinstance allocated withBufferUtils.static STBTTPackContext.Buffercreate(int capacity) Returns a newSTBTTPackContext.Bufferinstance allocated withBufferUtils.static STBTTPackContextcreate(long address) Returns a newSTBTTPackContextinstance for the specified memory address.static STBTTPackContext.Buffercreate(long address, int capacity) Create aSTBTTPackContext.Bufferinstance at the specified memory.static @Nullable STBTTPackContextcreateSafe(long address) static @Nullable STBTTPackContext.BuffercreateSafe(long address, int capacity) intintheight()static STBTTPackContextmalloc()Returns a newSTBTTPackContextinstance allocated withmemAlloc.static STBTTPackContext.Buffermalloc(int capacity) Returns a newSTBTTPackContext.Bufferinstance allocated withmemAlloc.static STBTTPackContext.Buffermalloc(int capacity, MemoryStack stack) Returns a newSTBTTPackContext.Bufferinstance allocated on the specifiedMemoryStack.static STBTTPackContextmalloc(MemoryStack stack) Returns a newSTBTTPackContextinstance allocated on the specifiedMemoryStack.static intnh_oversample(long struct) Unsafe version ofh_oversample().static intnheight(long struct) Unsafe version ofheight().static STBRPNode.Buffernnodes(long struct, int capacity) Unsafe version ofnodes(int).nodes(int capacity) static STBRPContextnpack_info(long struct) Unsafe version ofpack_info().static intnpadding(long struct) Unsafe version ofpadding().static ByteBuffernpixels(long struct, int capacity) Unsafe version ofpixels.static intnskip_missing(long struct) Unsafe version ofskip_missing().static intnstride_in_bytes(long struct) Unsafe version ofstride_in_bytes().static longnuser_allocator_context(long struct) Unsafe version ofuser_allocator_context().static intnv_oversample(long struct) Unsafe version ofv_oversample().static intnwidth(long struct) Unsafe version ofwidth().intpadding()pixels(int capacity) intsizeof()Returnssizeof(struct).booleanintlongintintwidth()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. -
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 aSTBTTPackContextinstance 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).- Specified by:
sizeofin classStruct<STBTTPackContext>
-
user_allocator_context
public long user_allocator_context()- Returns:
- the value of the
user_allocator_contextfield.
-
pack_info
- Returns:
- a
STBRPContextview of the struct pointed to by thepack_infofield.
-
width
public int width()- Returns:
- the value of the
widthfield.
-
height
public int height()- Returns:
- the value of the
heightfield.
-
stride_in_bytes
public int stride_in_bytes()- Returns:
- the value of the
stride_in_bytesfield.
-
padding
public int padding()- Returns:
- the value of the
paddingfield.
-
skip_missing
public boolean skip_missing()- Returns:
- the value of the
skip_missingfield.
-
h_oversample
public int h_oversample()- Returns:
- the value of the
h_oversamplefield.
-
v_oversample
public int v_oversample()- Returns:
- the value of the
v_oversamplefield.
-
pixels
- Returns:
- a
ByteBufferview of the data pointed to by thepixelsfield.
-
nodes
- Returns:
- a
STBRPNode.Bufferview of the struct array pointed to by thenodesfield.
-
malloc
Returns a newSTBTTPackContextinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSTBTTPackContextinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSTBTTPackContextinstance allocated withBufferUtils. -
create
Returns a newSTBTTPackContextinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBTTPackContext.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSTBTTPackContext.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSTBTTPackContext.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSTBTTPackContext.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newSTBTTPackContextinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSTBTTPackContextinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSTBTTPackContext.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSTBTTPackContext.Bufferinstance allocated on the specifiedMemoryStackand 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).
-