Package org.lwjgl.nuklear
Class NkUserFontGlyph
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
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
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 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, MemoryStack stack) Returns a newNkUserFontGlyph.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkUserFontGlyphcalloc(MemoryStack stack) Returns a newNkUserFontGlyphinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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(float value) Sets the specified value to theheightfield.static NkUserFontGlyphmalloc()Returns a newNkUserFontGlyphinstance allocated withmemAlloc.static NkUserFontGlyph.Buffermalloc(int capacity) Returns a newNkUserFontGlyph.Bufferinstance allocated withmemAlloc.static NkUserFontGlyph.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkUserFontGlyph.Bufferinstance allocated on the specifiedMemoryStack.static NkUserFontGlyphmalloc(MemoryStack stack) Returns a newNkUserFontGlyphinstance allocated on the specifiedMemoryStack.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()Passes theoffsetfield to the specifiedConsumer.Copies the specifiedNkVec2to theoffsetfield.set(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()Returnssizeof(struct).uv()uv(int index) Copies the specifiedNkVec2at the specified index of theuvfield.uv(Consumer<NkVec2.Buffer> consumer) Passes theuvfield to the specifiedConsumer.uv(NkVec2.Buffer value) Copies the specifiedNkVec2.Bufferto theuvfield.floatwidth()width(float value) Sets the specified value to thewidthfield.floatxadvance()xadvance(float value) Sets the specified value to thexadvancefield.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. -
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()Description copied from class:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<NkUserFontGlyph>
-
uv
- Returns:
- a
NkVec2.Buffer view of theuvfield.
-
uv
- Returns:
- a
NkVec2view of the struct at the specified index of theuvfield.
-
offset
- Returns:
- a
NkVec2view of theoffsetfield.
-
width
public float width()- Returns:
- the value of the
widthfield.
-
height
public float height()- Returns:
- the value of the
heightfield.
-
xadvance
public float xadvance()- Returns:
- the value of the
xadvancefield.
-
uv
Copies the specifiedNkVec2.Bufferto theuvfield. -
uv
Copies the specifiedNkVec2at the specified index of theuvfield. -
uv
Passes theuvfield to the specifiedConsumer. -
uv
-
offset
Copies the specifiedNkVec2to theoffsetfield. -
offset
Passes theoffsetfield to the specifiedConsumer. -
width
Sets the specified value to thewidthfield. -
height
Sets the specified value to theheightfield. -
xadvance
Sets the specified value to thexadvancefield. -
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
-
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.
-