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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The 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 aNkFontGlyph
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic NkFontGlyph
calloc()
Returns a newNkFontGlyph
instance allocated withmemCalloc
.static NkFontGlyph.Buffer
calloc
(int capacity) Returns a newNkFontGlyph.Buffer
instance allocated withmemCalloc
.static NkFontGlyph.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newNkFontGlyph.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NkFontGlyph
calloc
(MemoryStack stack) Returns a newNkFontGlyph
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
codepoint
(int value) Sets the specified value to thecodepoint
field.static NkFontGlyph
create()
Returns a newNkFontGlyph
instance allocated withBufferUtils
.static NkFontGlyph.Buffer
create
(int capacity) Returns a newNkFontGlyph.Buffer
instance allocated withBufferUtils
.static NkFontGlyph
create
(long address) Returns a newNkFontGlyph
instance for the specified memory address.static NkFontGlyph.Buffer
create
(long address, int capacity) Create aNkFontGlyph.Buffer
instance at the specified memory.static @Nullable NkFontGlyph
createSafe
(long address) static @Nullable NkFontGlyph.Buffer
createSafe
(long address, int capacity) float
h()
h
(float value) Sets the specified value to theh
field.static NkFontGlyph
malloc()
Returns a newNkFontGlyph
instance allocated withmemAlloc
.static NkFontGlyph.Buffer
malloc
(int capacity) Returns a newNkFontGlyph.Buffer
instance allocated withmemAlloc
.static NkFontGlyph.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newNkFontGlyph.Buffer
instance allocated on the specifiedMemoryStack
.static NkFontGlyph
malloc
(MemoryStack stack) Returns a newNkFontGlyph
instance allocated on the specifiedMemoryStack
.static int
ncodepoint
(long struct) Unsafe version ofcodepoint()
.static void
ncodepoint
(long struct, int value) Unsafe version ofcodepoint
.static float
nh
(long struct) Unsafe version ofh()
.static void
nh
(long struct, float value) Unsafe version ofh
.static float
nu0
(long struct) Unsafe version ofu0()
.static void
nu0
(long struct, float value) Unsafe version ofu0
.static float
nu1
(long struct) Unsafe version ofu1()
.static void
nu1
(long struct, float value) Unsafe version ofu1
.static float
nv0
(long struct) Unsafe version ofv0()
.static void
nv0
(long struct, float value) Unsafe version ofv0
.static float
nv1
(long struct) Unsafe version ofv1()
.static void
nv1
(long struct, float value) Unsafe version ofv1
.static float
nw
(long struct) Unsafe version ofw()
.static void
nw
(long struct, float value) Unsafe version ofw
.static float
nx0
(long struct) Unsafe version ofx0()
.static void
nx0
(long struct, float value) Unsafe version ofx0
.static float
nx1
(long struct) Unsafe version ofx1()
.static void
nx1
(long struct, float value) Unsafe version ofx1
.static float
nxadvance
(long struct) Unsafe version ofxadvance()
.static void
nxadvance
(long struct, float value) Unsafe version ofxadvance
.static float
ny0
(long struct) Unsafe version ofy0()
.static void
ny0
(long struct, float value) Unsafe version ofy0
.static float
ny1
(long struct) Unsafe version ofy1()
.static void
ny1
(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.int
sizeof()
Returnssizeof(struct)
.float
u0()
u0
(float value) Sets the specified value to theu0
field.float
u1()
u1
(float value) Sets the specified value to theu1
field.float
v0()
v0
(float value) Sets the specified value to thev0
field.float
v1()
v1
(float value) Sets the specified value to thev1
field.float
w()
w
(float value) Sets the specified value to thew
field.float
x0()
x0
(float value) Sets the specified value to thex0
field.float
x1()
x1
(float value) Sets the specified value to thex1
field.float
xadvance()
xadvance
(float value) Sets the specified value to thexadvance
field.float
y0()
y0
(float value) Sets the specified value to they0
field.float
y1()
y1
(float value) Sets the specified value to they1
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods 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 aNkFontGlyph
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<NkFontGlyph>
-
codepoint
public int codepoint()- Returns:
- the value of the
codepoint
field.
-
xadvance
public float xadvance()- Returns:
- the value of the
xadvance
field.
-
x0
public float x0()- Returns:
- the value of the
x0
field.
-
y0
public float y0()- Returns:
- the value of the
y0
field.
-
x1
public float x1()- Returns:
- the value of the
x1
field.
-
y1
public float y1()- Returns:
- the value of the
y1
field.
-
w
public float w()- Returns:
- the value of the
w
field.
-
h
public float h()- Returns:
- the value of the
h
field.
-
u0
public float u0()- Returns:
- the value of the
u0
field.
-
v0
public float v0()- Returns:
- the value of the
v0
field.
-
u1
public float u1()- Returns:
- the value of the
u1
field.
-
v1
public float v1()- Returns:
- the value of the
v1
field.
-
codepoint
Sets the specified value to thecodepoint
field. -
xadvance
Sets the specified value to thexadvance
field. -
x0
Sets the specified value to thex0
field. -
y0
Sets the specified value to they0
field. -
x1
Sets the specified value to thex1
field. -
y1
Sets the specified value to they1
field. -
w
Sets the specified value to thew
field. -
h
Sets the specified value to theh
field. -
u0
Sets the specified value to theu0
field. -
v0
Sets the specified value to thev0
field. -
u1
Sets the specified value to theu1
field. -
v1
Sets the specified value to thev1
field. -
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 newNkFontGlyph
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newNkFontGlyph
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newNkFontGlyph
instance allocated withBufferUtils
. -
create
Returns a newNkFontGlyph
instance for the specified memory address. -
createSafe
-
malloc
Returns a newNkFontGlyph.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newNkFontGlyph.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newNkFontGlyph.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aNkFontGlyph.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newNkFontGlyph
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newNkFontGlyph
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newNkFontGlyph.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newNkFontGlyph.Buffer
instance allocated on the specifiedMemoryStack
and 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
.
-