Package org.lwjgl.nuklear
Class NkUserFontGlyph
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NkUserFontGlyph>
org.lwjgl.nuklear.NkUserFontGlyph
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkUserFontGlyph
extends org.lwjgl.system.Struct<NkUserFontGlyph>
implements org.lwjgl.system.NativeResource
Layout
struct nk_user_font_glyph {
struct nk_vec2 uv()[2];
struct nk_vec2 offset();
float width();
float height();
float xadvance();
}-
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.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
ConstructorsConstructorDescriptionNkUserFontGlyph(ByteBuffer container) Creates aNkUserFontGlyphinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkUserFontGlyphcalloc()Returns a newNkUserFontGlyphinstance allocated withmemCalloc.static NkUserFontGlyph.Buffercalloc(int capacity) Returns a newNkUserFontGlyph.Bufferinstance allocated withmemCalloc.static NkUserFontGlyph.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newNkUserFontGlyph.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontGlyphcalloc(org.lwjgl.system.MemoryStack stack) Returns a newNkUserFontGlyphinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontGlyphDeprecated.static NkUserFontGlyph.BuffercallocStack(int capacity) Deprecated.static NkUserFontGlyph.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static NkUserFontGlyphcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static NkUserFontGlyphcreate()Returns a newNkUserFontGlyphinstance allocated withBufferUtils.static NkUserFontGlyph.Buffercreate(int capacity) Returns a newNkUserFontGlyph.Bufferinstance allocated withBufferUtils.static NkUserFontGlyphcreate(long address) Returns a newNkUserFontGlyphinstance for the specified memory address.static NkUserFontGlyph.Buffercreate(long address, int capacity) Create aNkUserFontGlyph.Bufferinstance at the specified memory.static @Nullable NkUserFontGlyphcreateSafe(long address) static @Nullable NkUserFontGlyph.BuffercreateSafe(long address, int capacity) floatheight()height of the glyphheight(float value) Sets the specified value to theheight()field.static NkUserFontGlyphmalloc()Returns a newNkUserFontGlyphinstance allocated withmemAlloc.static NkUserFontGlyph.Buffermalloc(int capacity) Returns a newNkUserFontGlyph.Bufferinstance allocated withmemAlloc.static NkUserFontGlyph.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newNkUserFontGlyph.Bufferinstance allocated on the specifiedMemoryStack.static NkUserFontGlyphmalloc(org.lwjgl.system.MemoryStack stack) Returns a newNkUserFontGlyphinstance allocated on the specifiedMemoryStack.static NkUserFontGlyphDeprecated.static NkUserFontGlyph.BuffermallocStack(int capacity) Deprecated.static NkUserFontGlyph.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static NkUserFontGlyphmallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static floatnheight(long struct) Unsafe version ofheight().static voidnheight(long struct, float value) Unsafe version ofheight.static NkVec2noffset(long struct) Unsafe version ofoffset().static voidUnsafe version ofoffset.static NkVec2.Buffernuv(long struct) Unsafe version ofuv().static NkVec2nuv(long struct, int index) Unsafe version ofuv.static voidUnsafe version ofuv.static voidnuv(long struct, NkVec2.Buffer value) Unsafe version ofuv.static floatnwidth(long struct) Unsafe version ofwidth().static voidnwidth(long struct, float value) Unsafe version ofwidth.static floatnxadvance(long struct) Unsafe version ofxadvance().static voidnxadvance(long struct, float value) Unsafe version ofxadvance.offset()offset between top left and glyphset(NkUserFontGlyph src) Copies the specified struct data to this struct.set(NkVec2.Buffer uv, NkVec2 offset, float width, float height, float xadvance) Initializes this struct with the specified values.intsizeof()uv()texture coordinatesuv(int index) texture coordinatesuv(Consumer<NkVec2.Buffer> consumer) uv(NkVec2.Buffer value) Copies the specifiedNkVec2.Bufferto theuv()field.floatwidth()width of the glyphwidth(float value) Sets the specified value to thewidth()field.floatxadvance()offset to the next glyphxadvance(float value) Sets the specified value to thexadvance()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. -
UV
public static final int UVThe struct member offsets. -
OFFSET
public static final int OFFSETThe struct member offsets. -
WIDTH
public static final int WIDTHThe struct member offsets. -
HEIGHT
public static final int HEIGHTThe struct member offsets. -
XADVANCE
public static final int XADVANCEThe struct member offsets.
-
-
Constructor Details
-
NkUserFontGlyph
Creates aNkUserFontGlyphinstance 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<NkUserFontGlyph>
-
uv
texture coordinates -
uv
texture coordinates -
offset
offset between top left and glyph -
width
public float width()width of the glyph -
height
public float height()height of the glyph -
xadvance
public float xadvance()offset to the next glyph -
uv
Copies the specifiedNkVec2.Bufferto theuv()field. -
uv
-
uv
-
uv
-
offset
-
offset
-
width
Sets the specified value to thewidth()field. -
height
Sets the specified value to theheight()field. -
xadvance
Sets the specified value to thexadvance()field. -
set
public NkUserFontGlyph set(NkVec2.Buffer uv, NkVec2 offset, float width, float height, float xadvance) 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 newNkUserFontGlyphinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkUserFontGlyphinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkUserFontGlyphinstance allocated withBufferUtils. -
create
Returns a newNkUserFontGlyphinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkUserFontGlyph.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkUserFontGlyph.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkUserFontGlyph.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkUserFontGlyph.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 NkUserFontGlyph.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 NkUserFontGlyph.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newNkUserFontGlyphinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkUserFontGlyphinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkUserFontGlyph.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkUserFontGlyph.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nuv
Unsafe version ofuv(). -
nuv
Unsafe version ofuv. -
noffset
Unsafe version ofoffset(). -
nwidth
public static float nwidth(long struct) Unsafe version ofwidth(). -
nheight
public static float nheight(long struct) Unsafe version ofheight(). -
nxadvance
public static float nxadvance(long struct) Unsafe version ofxadvance(). -
nuv
Unsafe version ofuv. -
nuv
Unsafe version ofuv. -
noffset
Unsafe version ofoffset. -
nwidth
public static void nwidth(long struct, float value) Unsafe version ofwidth. -
nheight
public static void nheight(long struct, float value) Unsafe version ofheight. -
nxadvance
public static void nxadvance(long struct, float value) Unsafe version ofxadvance.
-