Package org.lwjgl.stb
Class STBTTBitmap
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<STBTTBitmap>
org.lwjgl.stb.STBTTBitmap
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class STBTTBitmap
extends org.lwjgl.system.Struct<STBTTBitmap>
implements org.lwjgl.system.NativeResource
Bitmap data.
Layout
struct stbtt__bitmap {
int w();
int h();
int stride();
unsigned char * pixels(int);
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.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 size in bytes.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
ConstructorsConstructorDescriptionSTBTTBitmap(ByteBuffer container) Creates aSTBTTBitmapinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTTBitmapcalloc()Returns a newSTBTTBitmapinstance allocated withmemCalloc.static STBTTBitmap.Buffercalloc(int capacity) Returns a newSTBTTBitmap.Bufferinstance allocated withmemCalloc.static STBTTBitmap.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newSTBTTBitmap.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTBitmapcalloc(org.lwjgl.system.MemoryStack stack) Returns a newSTBTTBitmapinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBTTBitmapDeprecated.static STBTTBitmap.BuffercallocStack(int capacity) Deprecated.static STBTTBitmap.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static STBTTBitmapcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static STBTTBitmapcreate()Returns a newSTBTTBitmapinstance allocated withBufferUtils.static STBTTBitmap.Buffercreate(int capacity) Returns a newSTBTTBitmap.Bufferinstance allocated withBufferUtils.static STBTTBitmapcreate(long address) Returns a newSTBTTBitmapinstance for the specified memory address.static STBTTBitmap.Buffercreate(long address, int capacity) Create aSTBTTBitmap.Bufferinstance at the specified memory.static @Nullable STBTTBitmapcreateSafe(long address) static @Nullable STBTTBitmap.BuffercreateSafe(long address, int capacity) inth()the bitmap heighth(int value) Sets the specified value to theh()field.static STBTTBitmapmalloc()Returns a newSTBTTBitmapinstance allocated withmemAlloc.static STBTTBitmap.Buffermalloc(int capacity) Returns a newSTBTTBitmap.Bufferinstance allocated withmemAlloc.static STBTTBitmap.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newSTBTTBitmap.Bufferinstance allocated on the specifiedMemoryStack.static STBTTBitmapmalloc(org.lwjgl.system.MemoryStack stack) Returns a newSTBTTBitmapinstance allocated on the specifiedMemoryStack.static STBTTBitmapDeprecated.static STBTTBitmap.BuffermallocStack(int capacity) Deprecated.static STBTTBitmap.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static STBTTBitmapmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intnh(long struct) Unsafe version ofh().static voidnh(long struct, int value) Unsafe version ofh.static ByteBuffernpixels(long struct, int capacity) Unsafe version ofpixels.static voidnpixels(long struct, ByteBuffer value) Unsafe version ofpixels.static intnstride(long struct) Unsafe version ofstride().static voidnstride(long struct, int value) Unsafe version ofstride.static intnw(long struct) Unsafe version ofw().static voidnw(long struct, int value) Unsafe version ofw.pixels(int capacity) pixels(ByteBuffer value) Sets the address of the specifiedByteBufferto thepixels(int)field.set(int w, int h, int stride, ByteBuffer pixels) Initializes this struct with the specified values.set(STBTTBitmap src) Copies the specified struct data to this struct.intsizeof()intstride()the row stride, in bytesstride(int value) Sets the specified value to thestride()field.static voidvalidate(long struct) Validates pointer members that should not beNULL.intw()the bitmap widthw(int value) Sets the specified value to thew()field.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods 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. -
W
public static final int WThe struct member offsets. -
H
public static final int HThe struct member offsets. -
STRIDE
public static final int STRIDEThe struct member offsets. -
PIXELS
public static final int PIXELSThe struct member offsets.
-
-
Constructor Details
-
STBTTBitmap
Creates aSTBTTBitmapinstance 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()- Specified by:
sizeofin classorg.lwjgl.system.Struct<STBTTBitmap>
-
w
public int w()the bitmap width -
h
public int h()the bitmap height -
stride
public int stride()the row stride, in bytes -
pixels
- Parameters:
capacity- the number of elements in the returned buffer- Returns:
- the bitmap data
-
w
Sets the specified value to thew()field. -
h
Sets the specified value to theh()field. -
stride
Sets the specified value to thestride()field. -
pixels
Sets the address of the specifiedByteBufferto thepixels(int)field. -
set
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 newSTBTTBitmapinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newSTBTTBitmapinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newSTBTTBitmapinstance allocated withBufferUtils. -
create
Returns a newSTBTTBitmapinstance for the specified memory address. -
createSafe
-
malloc
Returns a newSTBTTBitmap.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newSTBTTBitmap.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newSTBTTBitmap.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aSTBTTBitmap.Bufferinstance 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 public static STBTTBitmap.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static STBTTBitmap.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newSTBTTBitmapinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newSTBTTBitmapinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newSTBTTBitmap.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newSTBTTBitmap.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nw
public static int nw(long struct) Unsafe version ofw(). -
nh
public static int nh(long struct) Unsafe version ofh(). -
nstride
public static int nstride(long struct) Unsafe version ofstride(). -
npixels
Unsafe version ofpixels. -
nw
public static void nw(long struct, int value) Unsafe version ofw. -
nh
public static void nh(long struct, int value) Unsafe version ofh. -
nstride
public static void nstride(long struct, int value) Unsafe version ofstride. -
npixels
Unsafe version ofpixels. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-