Package org.lwjgl.util.freetype
Class FT_Bitmap
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct FT_Bitmap {
unsigned int rows;
unsigned int width;
int pitch;
unsigned char * buffer;
unsigned short num_grays;
unsigned char pixel_mode;
unsigned char palette_mode;
void * palette;
}-
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 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
ConstructorsConstructorDescriptionFT_Bitmap(ByteBuffer container) Creates aFT_Bitmapinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescription@Nullable ByteBufferbuffer(int capacity) static FT_Bitmapcalloc()Returns a newFT_Bitmapinstance allocated withmemCalloc.static FT_Bitmap.Buffercalloc(int capacity) Returns a newFT_Bitmap.Bufferinstance allocated withmemCalloc.static FT_Bitmap.Buffercalloc(int capacity, MemoryStack stack) Returns a newFT_Bitmap.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static FT_Bitmapcalloc(MemoryStack stack) Returns a newFT_Bitmapinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static FT_Bitmapcreate()Returns a newFT_Bitmapinstance allocated withBufferUtils.static FT_Bitmap.Buffercreate(int capacity) Returns a newFT_Bitmap.Bufferinstance allocated withBufferUtils.static FT_Bitmapcreate(long address) Returns a newFT_Bitmapinstance for the specified memory address.static FT_Bitmap.Buffercreate(long address, int capacity) Create aFT_Bitmap.Bufferinstance at the specified memory.static @Nullable FT_BitmapcreateSafe(long address) static @Nullable FT_Bitmap.BuffercreateSafe(long address, int capacity) static FT_Bitmapmalloc()Returns a newFT_Bitmapinstance allocated withmemAlloc.static FT_Bitmap.Buffermalloc(int capacity) Returns a newFT_Bitmap.Bufferinstance allocated withmemAlloc.static FT_Bitmap.Buffermalloc(int capacity, MemoryStack stack) Returns a newFT_Bitmap.Bufferinstance allocated on the specifiedMemoryStack.static FT_Bitmapmalloc(MemoryStack stack) Returns a newFT_Bitmapinstance allocated on the specifiedMemoryStack.static @Nullable ByteBuffernbuffer(long struct, int capacity) Unsafe version ofbuffer.static shortnnum_grays(long struct) Unsafe version ofnum_grays().static longnpalette(long struct) Unsafe version ofpalette().static bytenpalette_mode(long struct) Unsafe version ofpalette_mode().static intnpitch(long struct) Unsafe version ofpitch().static bytenpixel_mode(long struct) Unsafe version ofpixel_mode().static intnrows(long struct) Unsafe version ofrows().shortstatic intnwidth(long struct) Unsafe version ofwidth().longpalette()byteintpitch()byteintrows()intsizeof()Returnssizeof(struct).intwidth()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. -
ROWS
public static final int ROWSThe struct member offsets. -
WIDTH
public static final int WIDTHThe struct member offsets. -
PITCH
public static final int PITCHThe struct member offsets. -
BUFFER
public static final int BUFFERThe struct member offsets. -
NUM_GRAYS
public static final int NUM_GRAYSThe struct member offsets. -
PIXEL_MODE
public static final int PIXEL_MODEThe struct member offsets. -
PALETTE_MODE
public static final int PALETTE_MODEThe struct member offsets. -
PALETTE
public static final int PALETTEThe struct member offsets.
-
-
Constructor Details
-
FT_Bitmap
Creates aFT_Bitmapinstance 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). -
rows
public int rows()- Returns:
- the value of the
rowsfield.
-
width
public int width()- Returns:
- the value of the
widthfield.
-
pitch
public int pitch()- Returns:
- the value of the
pitchfield.
-
buffer
- Returns:
- a
ByteBufferview of the data pointed to by thebufferfield.
-
num_grays
public short num_grays()- Returns:
- the value of the
num_graysfield.
-
pixel_mode
public byte pixel_mode()- Returns:
- the value of the
pixel_modefield.
-
palette_mode
public byte palette_mode()- Returns:
- the value of the
palette_modefield.
-
palette
public long palette()- Returns:
- the value of the
palettefield.
-
malloc
Returns a newFT_Bitmapinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newFT_Bitmapinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newFT_Bitmapinstance allocated withBufferUtils. -
create
Returns a newFT_Bitmapinstance for the specified memory address. -
createSafe
-
malloc
Returns a newFT_Bitmap.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newFT_Bitmap.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newFT_Bitmap.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aFT_Bitmap.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newFT_Bitmapinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newFT_Bitmapinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newFT_Bitmap.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newFT_Bitmap.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nrows
public static int nrows(long struct) Unsafe version ofrows(). -
nwidth
public static int nwidth(long struct) Unsafe version ofwidth(). -
npitch
public static int npitch(long struct) Unsafe version ofpitch(). -
nbuffer
Unsafe version ofbuffer. -
nnum_grays
public static short nnum_grays(long struct) Unsafe version ofnum_grays(). -
npixel_mode
public static byte npixel_mode(long struct) Unsafe version ofpixel_mode(). -
npalette_mode
public static byte npalette_mode(long struct) Unsafe version ofpalette_mode(). -
npalette
public static long npalette(long struct) Unsafe version ofpalette().
-