Package org.lwjgl.nuklear
Class NkUserFontGlyph
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nuklear.NkUserFontGlyph
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class NkUserFontGlyph extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct nk_user_font_glyph {struct nk_vec2uv()[2];struct nk_vec2offset(); floatwidth(); floatheight(); floatxadvance(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNkUserFontGlyph.BufferAn array ofNkUserFontGlyphstructs.
-
Constructor Summary
Constructors Constructor Description NkUserFontGlyph(java.nio.ByteBuffer container)Creates aNkUserFontGlyphinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static 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 NkUserFontGlyphcallocStack()Deprecated.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 NkUserFontGlyphcreateSafe(long address)static NkUserFontGlyph.BuffercreateSafe(long address, int capacity)floatheight()height of the glyphNkUserFontGlyphheight(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 NkUserFontGlyphmallocStack()Deprecated.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 voidnoffset(long struct, NkVec2 value)Unsafe version ofoffset.static NkVec2.Buffernuv(long struct)Unsafe version ofuv().static NkVec2nuv(long struct, int index)Unsafe version ofuv.static voidnuv(long struct, int index, NkVec2 value)Unsafe 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.NkVec2offset()offset between top left and glyphNkUserFontGlyphoffset(java.util.function.Consumer<NkVec2> consumer)Passes theoffset()field to the specifiedConsumer.NkUserFontGlyphoffset(NkVec2 value)NkUserFontGlyphset(NkUserFontGlyph src)Copies the specified struct data to this struct.NkUserFontGlyphset(NkVec2.Buffer uv, NkVec2 offset, float width, float height, float xadvance)Initializes this struct with the specified values.intsizeof()NkVec2.Bufferuv()texture coordinatesNkVec2uv(int index)texture coordinatesNkUserFontGlyphuv(int index, java.util.function.Consumer<NkVec2> consumer)NkUserFontGlyphuv(int index, NkVec2 value)NkUserFontGlyphuv(java.util.function.Consumer<NkVec2.Buffer> consumer)Passes theuv()field to the specifiedConsumer.NkUserFontGlyphuv(NkVec2.Buffer value)Copies the specifiedNkVec2.Bufferto theuv()field.floatwidth()width of the glyphNkUserFontGlyphwidth(float value)Sets the specified value to thewidth()field.floatxadvance()offset to the next glyphNkUserFontGlyphxadvance(float value)Sets the specified value to thexadvance()field.
-
-
-
Constructor Detail
-
NkUserFontGlyph
public NkUserFontGlyph(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
uv
public NkVec2.Buffer uv() public NkVec2 uv(int index)
texture coordinates
-
offset
public NkVec2 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
public NkUserFontGlyph uv(NkVec2.Buffer value)
Copies the specifiedNkVec2.Bufferto theuv()field.
-
uv
public NkUserFontGlyph uv(int index, NkVec2 value)
-
uv
public NkUserFontGlyph uv(java.util.function.Consumer<NkVec2.Buffer> consumer)
Passes theuv()field to the specifiedConsumer.
-
uv
public NkUserFontGlyph uv(int index, java.util.function.Consumer<NkVec2> consumer)
-
offset
public NkUserFontGlyph offset(NkVec2 value)
-
offset
public NkUserFontGlyph offset(java.util.function.Consumer<NkVec2> consumer)
Passes theoffset()field to the specifiedConsumer.
-
width
public NkUserFontGlyph width(float value)
Sets the specified value to thewidth()field.
-
height
public NkUserFontGlyph height(float value)
Sets the specified value to theheight()field.
-
xadvance
public NkUserFontGlyph xadvance(float value)
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
public NkUserFontGlyph set(NkUserFontGlyph src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static NkUserFontGlyph malloc()
Returns a newNkUserFontGlyphinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NkUserFontGlyph calloc()
Returns a newNkUserFontGlyphinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NkUserFontGlyph create()
Returns a newNkUserFontGlyphinstance allocated withBufferUtils.
-
create
public static NkUserFontGlyph create(long address)
Returns a newNkUserFontGlyphinstance for the specified memory address.
-
createSafe
@Nullable public static NkUserFontGlyph createSafe(long address)
-
malloc
public static NkUserFontGlyph.Buffer malloc(int capacity)
Returns a newNkUserFontGlyph.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NkUserFontGlyph.Buffer calloc(int capacity)
Returns a newNkUserFontGlyph.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NkUserFontGlyph.Buffer create(int capacity)
Returns a newNkUserFontGlyph.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NkUserFontGlyph.Buffer create(long address, int capacity)
Create aNkUserFontGlyph.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static NkUserFontGlyph.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static NkUserFontGlyph mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkUserFontGlyph callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkUserFontGlyph mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static NkUserFontGlyph callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static NkUserFontGlyph.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static NkUserFontGlyph.Buffer callocStack(int capacity)
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
public static NkUserFontGlyph malloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkUserFontGlyphinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static NkUserFontGlyph calloc(org.lwjgl.system.MemoryStack stack)
Returns a newNkUserFontGlyphinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static NkUserFontGlyph.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkUserFontGlyph.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static NkUserFontGlyph.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newNkUserFontGlyph.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nuv
public static NkVec2.Buffer nuv(long struct)
Unsafe version ofuv().
-
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
public static void nuv(long struct, NkVec2.Buffer value)Unsafe version ofuv.
-
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.
-
-