Package org.lwjgl.nuklear
Class NkFontGlyph
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct nk_font_glyph {
nk_rune codepoint;
float xadvance;
float x0;
float y0;
float x1;
float y1;
float w;
float h;
float u0;
float v0;
float u1;
float v1;
}-
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.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.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionNkFontGlyph(ByteBuffer container) Creates aNkFontGlyphinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkFontGlyphcalloc()Returns a newNkFontGlyphinstance allocated withmemCalloc.static NkFontGlyph.Buffercalloc(int capacity) Returns a newNkFontGlyph.Bufferinstance allocated withmemCalloc.static NkFontGlyph.Buffercalloc(int capacity, MemoryStack stack) Returns a newNkFontGlyph.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NkFontGlyphcalloc(MemoryStack stack) Returns a newNkFontGlyphinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcodepoint(int value) Sets the specified value to thecodepointfield.static NkFontGlyphcreate()Returns a newNkFontGlyphinstance allocated withBufferUtils.static NkFontGlyph.Buffercreate(int capacity) Returns a newNkFontGlyph.Bufferinstance allocated withBufferUtils.static NkFontGlyphcreate(long address) Returns a newNkFontGlyphinstance for the specified memory address.static NkFontGlyph.Buffercreate(long address, int capacity) Create aNkFontGlyph.Bufferinstance at the specified memory.static @Nullable NkFontGlyphcreateSafe(long address) static @Nullable NkFontGlyph.BuffercreateSafe(long address, int capacity) floath()h(float value) Sets the specified value to thehfield.static NkFontGlyphmalloc()Returns a newNkFontGlyphinstance allocated withmemAlloc.static NkFontGlyph.Buffermalloc(int capacity) Returns a newNkFontGlyph.Bufferinstance allocated withmemAlloc.static NkFontGlyph.Buffermalloc(int capacity, MemoryStack stack) Returns a newNkFontGlyph.Bufferinstance allocated on the specifiedMemoryStack.static NkFontGlyphmalloc(MemoryStack stack) Returns a newNkFontGlyphinstance allocated on the specifiedMemoryStack.static intncodepoint(long struct) Unsafe version ofcodepoint().static voidncodepoint(long struct, int value) Unsafe version ofcodepoint.static floatnh(long struct) Unsafe version ofh().static voidnh(long struct, float value) Unsafe version ofh.static floatnu0(long struct) Unsafe version ofu0().static voidnu0(long struct, float value) Unsafe version ofu0.static floatnu1(long struct) Unsafe version ofu1().static voidnu1(long struct, float value) Unsafe version ofu1.static floatnv0(long struct) Unsafe version ofv0().static voidnv0(long struct, float value) Unsafe version ofv0.static floatnv1(long struct) Unsafe version ofv1().static voidnv1(long struct, float value) Unsafe version ofv1.static floatnw(long struct) Unsafe version ofw().static voidnw(long struct, float value) Unsafe version ofw.static floatnx0(long struct) Unsafe version ofx0().static voidnx0(long struct, float value) Unsafe version ofx0.static floatnx1(long struct) Unsafe version ofx1().static voidnx1(long struct, float value) Unsafe version ofx1.static floatnxadvance(long struct) Unsafe version ofxadvance().static voidnxadvance(long struct, float value) Unsafe version ofxadvance.static floatny0(long struct) Unsafe version ofy0().static voidny0(long struct, float value) Unsafe version ofy0.static floatny1(long struct) Unsafe version ofy1().static voidny1(long struct, float value) Unsafe version ofy1.set(int codepoint, float xadvance, float x0, float y0, float x1, float y1, float w, float h, float u0, float v0, float u1, float v1) Initializes this struct with the specified values.set(NkFontGlyph src) Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).floatu0()u0(float value) Sets the specified value to theu0field.floatu1()u1(float value) Sets the specified value to theu1field.floatv0()v0(float value) Sets the specified value to thev0field.floatv1()v1(float value) Sets the specified value to thev1field.floatw()w(float value) Sets the specified value to thewfield.floatx0()x0(float value) Sets the specified value to thex0field.floatx1()x1(float value) Sets the specified value to thex1field.floatxadvance()xadvance(float value) Sets the specified value to thexadvancefield.floaty0()y0(float value) Sets the specified value to they0field.floaty1()y1(float value) Sets the specified value to they1field.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. -
CODEPOINT
public static final int CODEPOINTThe struct member offsets. -
XADVANCE
public static final int XADVANCEThe struct member offsets. -
X0
public static final int X0The struct member offsets. -
Y0
public static final int Y0The struct member offsets. -
X1
public static final int X1The struct member offsets. -
Y1
public static final int Y1The struct member offsets. -
W
public static final int WThe struct member offsets. -
H
public static final int HThe struct member offsets. -
U0
public static final int U0The struct member offsets. -
V0
public static final int V0The struct member offsets. -
U1
public static final int U1The struct member offsets. -
V1
public static final int V1The struct member offsets.
-
-
Constructor Details
-
NkFontGlyph
Creates aNkFontGlyphinstance 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<NkFontGlyph>
-
codepoint
public int codepoint()- Returns:
- the value of the
codepointfield.
-
xadvance
public float xadvance()- Returns:
- the value of the
xadvancefield.
-
x0
public float x0()- Returns:
- the value of the
x0field.
-
y0
public float y0()- Returns:
- the value of the
y0field.
-
x1
public float x1()- Returns:
- the value of the
x1field.
-
y1
public float y1()- Returns:
- the value of the
y1field.
-
w
public float w()- Returns:
- the value of the
wfield.
-
h
public float h()- Returns:
- the value of the
hfield.
-
u0
public float u0()- Returns:
- the value of the
u0field.
-
v0
public float v0()- Returns:
- the value of the
v0field.
-
u1
public float u1()- Returns:
- the value of the
u1field.
-
v1
public float v1()- Returns:
- the value of the
v1field.
-
codepoint
Sets the specified value to thecodepointfield. -
xadvance
Sets the specified value to thexadvancefield. -
x0
Sets the specified value to thex0field. -
y0
Sets the specified value to they0field. -
x1
Sets the specified value to thex1field. -
y1
Sets the specified value to they1field. -
w
Sets the specified value to thewfield. -
h
Sets the specified value to thehfield. -
u0
Sets the specified value to theu0field. -
v0
Sets the specified value to thev0field. -
u1
Sets the specified value to theu1field. -
v1
Sets the specified value to thev1field. -
set
public NkFontGlyph set(int codepoint, float xadvance, float x0, float y0, float x1, float y1, float w, float h, float u0, float v0, float u1, float v1) 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 newNkFontGlyphinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newNkFontGlyphinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newNkFontGlyphinstance allocated withBufferUtils. -
create
Returns a newNkFontGlyphinstance for the specified memory address. -
createSafe
-
malloc
Returns a newNkFontGlyph.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newNkFontGlyph.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newNkFontGlyph.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aNkFontGlyph.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newNkFontGlyphinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newNkFontGlyphinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newNkFontGlyph.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newNkFontGlyph.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
ncodepoint
public static int ncodepoint(long struct) Unsafe version ofcodepoint(). -
nxadvance
public static float nxadvance(long struct) Unsafe version ofxadvance(). -
nx0
public static float nx0(long struct) Unsafe version ofx0(). -
ny0
public static float ny0(long struct) Unsafe version ofy0(). -
nx1
public static float nx1(long struct) Unsafe version ofx1(). -
ny1
public static float ny1(long struct) Unsafe version ofy1(). -
nw
public static float nw(long struct) Unsafe version ofw(). -
nh
public static float nh(long struct) Unsafe version ofh(). -
nu0
public static float nu0(long struct) Unsafe version ofu0(). -
nv0
public static float nv0(long struct) Unsafe version ofv0(). -
nu1
public static float nu1(long struct) Unsafe version ofu1(). -
nv1
public static float nv1(long struct) Unsafe version ofv1(). -
ncodepoint
public static void ncodepoint(long struct, int value) Unsafe version ofcodepoint. -
nxadvance
public static void nxadvance(long struct, float value) Unsafe version ofxadvance. -
nx0
public static void nx0(long struct, float value) Unsafe version ofx0. -
ny0
public static void ny0(long struct, float value) Unsafe version ofy0. -
nx1
public static void nx1(long struct, float value) Unsafe version ofx1. -
ny1
public static void ny1(long struct, float value) Unsafe version ofy1. -
nw
public static void nw(long struct, float value) Unsafe version ofw. -
nh
public static void nh(long struct, float value) Unsafe version ofh. -
nu0
public static void nu0(long struct, float value) Unsafe version ofu0. -
nv0
public static void nv0(long struct, float value) Unsafe version ofv0. -
nu1
public static void nu1(long struct, float value) Unsafe version ofu1. -
nv1
public static void nv1(long struct, float value) Unsafe version ofv1.
-