public class STBTTBitmap
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
w – the bitmap widthh – the bitmap heightstride – the row stride, in bytespixels – the bitmap data
struct stbtt__bitmap {
int w;
int h;
int stride;
unsigned char * pixels;
}| Modifier and Type | Class and Description |
|---|---|
static class |
STBTTBitmap.Buffer
An array of
STBTTBitmap structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
H
The struct member offsets.
|
static int |
PIXELS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STRIDE
The struct member offsets.
|
static int |
W
The struct member offsets.
|
| Constructor and Description |
|---|
STBTTBitmap(java.nio.ByteBuffer container)
Creates a
STBTTBitmap instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static STBTTBitmap |
calloc()
Returns a new
STBTTBitmap instance allocated with memCalloc. |
static STBTTBitmap.Buffer |
calloc(int capacity)
Returns a new
STBTTBitmap.Buffer instance allocated with memCalloc. |
static STBTTBitmap |
callocStack()
Returns a new
STBTTBitmap instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static STBTTBitmap.Buffer |
callocStack(int capacity)
Returns a new
STBTTBitmap.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static STBTTBitmap.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
STBTTBitmap.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static STBTTBitmap |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
STBTTBitmap instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static STBTTBitmap |
create()
Returns a new
STBTTBitmap instance allocated with BufferUtils. |
static STBTTBitmap.Buffer |
create(int capacity)
Returns a new
STBTTBitmap.Buffer instance allocated with BufferUtils. |
static STBTTBitmap |
create(long address)
Returns a new
STBTTBitmap instance for the specified memory address. |
static STBTTBitmap.Buffer |
create(long address,
int capacity)
Create a
STBTTBitmap.Buffer instance at the specified memory. |
static STBTTBitmap |
createSafe(long address)
|
static STBTTBitmap.Buffer |
createSafe(long address,
int capacity)
|
int |
h()
Returns the value of the
h field. |
STBTTBitmap |
h(int value)
Sets the specified value to the
h field. |
static STBTTBitmap |
malloc()
Returns a new
STBTTBitmap instance allocated with memAlloc. |
static STBTTBitmap.Buffer |
malloc(int capacity)
Returns a new
STBTTBitmap.Buffer instance allocated with memAlloc. |
static STBTTBitmap |
mallocStack()
Returns a new
STBTTBitmap instance allocated on the thread-local MemoryStack. |
static STBTTBitmap.Buffer |
mallocStack(int capacity)
Returns a new
STBTTBitmap.Buffer instance allocated on the thread-local MemoryStack. |
static STBTTBitmap.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
STBTTBitmap.Buffer instance allocated on the specified MemoryStack. |
static STBTTBitmap |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
STBTTBitmap instance allocated on the specified MemoryStack. |
static int |
nh(long struct)
Unsafe version of
h(). |
static void |
nh(long struct,
int value)
Unsafe version of
h. |
static void |
npixels(long struct,
java.nio.ByteBuffer value)
Unsafe version of
pixels. |
static java.nio.ByteBuffer |
npixels(long struct,
int capacity)
Unsafe version of
pixels. |
static int |
nstride(long struct)
Unsafe version of
stride(). |
static void |
nstride(long struct,
int value)
Unsafe version of
stride. |
static int |
nw(long struct)
Unsafe version of
w(). |
static void |
nw(long struct,
int value)
Unsafe version of
w. |
STBTTBitmap |
pixels(java.nio.ByteBuffer value)
Sets the address of the specified
ByteBuffer to the pixels field. |
java.nio.ByteBuffer |
pixels(int capacity)
Returns a
ByteBuffer view of the data pointed to by the pixels field. |
STBTTBitmap |
set(int w,
int h,
int stride,
java.nio.ByteBuffer pixels)
Initializes this struct with the specified values.
|
STBTTBitmap |
set(STBTTBitmap src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
stride()
Returns the value of the
stride field. |
STBTTBitmap |
stride(int value)
Sets the specified value to the
stride field. |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
int |
w()
Returns the value of the
w field. |
STBTTBitmap |
w(int value)
Sets the specified value to the
w field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int W
public static final int H
public static final int STRIDE
public static final int PIXELS
public STBTTBitmap(java.nio.ByteBuffer container)
STBTTBitmap instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int w()
w field.public int h()
h field.public int stride()
stride field.public java.nio.ByteBuffer pixels(int capacity)
ByteBuffer view of the data pointed to by the pixels field.capacity - the number of elements in the returned bufferpublic STBTTBitmap w(int value)
w field.public STBTTBitmap h(int value)
h field.public STBTTBitmap stride(int value)
stride field.public STBTTBitmap pixels(java.nio.ByteBuffer value)
ByteBuffer to the pixels field.public STBTTBitmap set(int w, int h, int stride, java.nio.ByteBuffer pixels)
public STBTTBitmap set(STBTTBitmap src)
src - the source structpublic static STBTTBitmap malloc()
STBTTBitmap instance allocated with memAlloc. The instance must be explicitly freed.public static STBTTBitmap calloc()
STBTTBitmap instance allocated with memCalloc. The instance must be explicitly freed.public static STBTTBitmap create()
STBTTBitmap instance allocated with BufferUtils.public static STBTTBitmap create(long address)
STBTTBitmap instance for the specified memory address.@Nullable public static STBTTBitmap createSafe(long address)
public static STBTTBitmap.Buffer malloc(int capacity)
STBTTBitmap.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static STBTTBitmap.Buffer calloc(int capacity)
STBTTBitmap.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static STBTTBitmap.Buffer create(int capacity)
STBTTBitmap.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static STBTTBitmap.Buffer create(long address, int capacity)
STBTTBitmap.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static STBTTBitmap.Buffer createSafe(long address, int capacity)
public static STBTTBitmap mallocStack()
STBTTBitmap instance allocated on the thread-local MemoryStack.public static STBTTBitmap callocStack()
STBTTBitmap instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static STBTTBitmap mallocStack(org.lwjgl.system.MemoryStack stack)
STBTTBitmap instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static STBTTBitmap callocStack(org.lwjgl.system.MemoryStack stack)
STBTTBitmap instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static STBTTBitmap.Buffer mallocStack(int capacity)
STBTTBitmap.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static STBTTBitmap.Buffer callocStack(int capacity)
STBTTBitmap.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static STBTTBitmap.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
STBTTBitmap.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static STBTTBitmap.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
STBTTBitmap.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nw(long struct)
w().public static int nh(long struct)
h().public static int nstride(long struct)
stride().public static java.nio.ByteBuffer npixels(long struct,
int capacity)
pixels.public static void nw(long struct,
int value)
w.public static void nh(long struct,
int value)
h.public static void nstride(long struct,
int value)
stride.public static void npixels(long struct,
java.nio.ByteBuffer value)
pixels.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.