Package org.lwjgl.nanovg
Class NVGGlyphPosition
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.NVGGlyphPosition
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class NVGGlyphPosition extends Struct
A glyph position.Member documentation
str
– position of the glyph in the input stringx
– the x-coordinate of the logical glyph positionminx
– the left bound of the glyph shapemaxx
– the right bound of the glyph shape
Layout
struct NVGglyphPosition { char * str; float x; float minx; float maxx; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
NVGGlyphPosition.Buffer
An array ofNVGGlyphPosition
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description NVGGlyphPosition(java.nio.ByteBuffer container)
Creates aNVGGlyphPosition
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static NVGGlyphPosition
calloc()
Returns a newNVGGlyphPosition
instance allocated withmemCalloc
.static NVGGlyphPosition.Buffer
calloc(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated withmemCalloc
.static NVGGlyphPosition
callocStack()
Returns a newNVGGlyphPosition
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NVGGlyphPosition.Buffer
callocStack(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static NVGGlyphPosition.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newNVGGlyphPosition.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NVGGlyphPosition
callocStack(MemoryStack stack)
Returns a newNVGGlyphPosition
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static NVGGlyphPosition
create()
Returns a newNVGGlyphPosition
instance allocated withBufferUtils
.static NVGGlyphPosition.Buffer
create(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated withBufferUtils
.static NVGGlyphPosition
create(long address)
Returns a newNVGGlyphPosition
instance for the specified memory address ornull
if the address isNULL
.static NVGGlyphPosition.Buffer
create(long address, int capacity)
Create aNVGGlyphPosition.Buffer
instance at the specified memory.static NVGGlyphPosition
malloc()
Returns a newNVGGlyphPosition
instance allocated withmemAlloc
.static NVGGlyphPosition.Buffer
malloc(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated withmemAlloc
.static NVGGlyphPosition
mallocStack()
Returns a newNVGGlyphPosition
instance allocated on the thread-localMemoryStack
.static NVGGlyphPosition.Buffer
mallocStack(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated on the thread-localMemoryStack
.static NVGGlyphPosition.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newNVGGlyphPosition.Buffer
instance allocated on the specifiedMemoryStack
.static NVGGlyphPosition
mallocStack(MemoryStack stack)
Returns a newNVGGlyphPosition
instance allocated on the specifiedMemoryStack
.float
maxx()
Returns the value of themaxx
field.NVGGlyphPosition
maxx(float value)
Sets the specified value to themaxx
field.float
minx()
Returns the value of theminx
field.NVGGlyphPosition
minx(float value)
Sets the specified value to theminx
field.NVGGlyphPosition
nset(long struct)
Unsafe version ofset
.NVGGlyphPosition
set(long str, float x, float minx, float maxx)
Initializes this struct with the specified values.NVGGlyphPosition
set(NVGGlyphPosition src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.long
str()
Returns the value of thestr
field.NVGGlyphPosition
str(long value)
Sets the specified value to thestr
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsNVGGlyphPosition.validate(long)
for each struct contained in the specified struct array.float
x()
Returns the value of thex
field.NVGGlyphPosition
x(float value)
Sets the specified value to thex
field.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
NVGGlyphPosition
public NVGGlyphPosition(java.nio.ByteBuffer container)
Creates aNVGGlyphPosition
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 Detail
-
sizeof
public int sizeof()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
str
public long str()
Returns the value of thestr
field.
-
x
public float x()
Returns the value of thex
field.
-
minx
public float minx()
Returns the value of theminx
field.
-
maxx
public float maxx()
Returns the value of themaxx
field.
-
str
public NVGGlyphPosition str(long value)
Sets the specified value to thestr
field.
-
x
public NVGGlyphPosition x(float value)
Sets the specified value to thex
field.
-
minx
public NVGGlyphPosition minx(float value)
Sets the specified value to theminx
field.
-
maxx
public NVGGlyphPosition maxx(float value)
Sets the specified value to themaxx
field.
-
set
public NVGGlyphPosition set(long str, float x, float minx, float maxx)
Initializes this struct with the specified values.
-
nset
public NVGGlyphPosition nset(long struct)
Unsafe version ofset
.
-
set
public NVGGlyphPosition set(NVGGlyphPosition src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static NVGGlyphPosition malloc()
Returns a newNVGGlyphPosition
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static NVGGlyphPosition calloc()
Returns a newNVGGlyphPosition
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static NVGGlyphPosition create()
Returns a newNVGGlyphPosition
instance allocated withBufferUtils
.
-
create
public static NVGGlyphPosition create(long address)
Returns a newNVGGlyphPosition
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static NVGGlyphPosition.Buffer malloc(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static NVGGlyphPosition.Buffer calloc(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static NVGGlyphPosition.Buffer create(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static NVGGlyphPosition.Buffer create(long address, int capacity)
Create aNVGGlyphPosition.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static NVGGlyphPosition mallocStack()
Returns a newNVGGlyphPosition
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static NVGGlyphPosition callocStack()
Returns a newNVGGlyphPosition
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static NVGGlyphPosition mallocStack(MemoryStack stack)
Returns a newNVGGlyphPosition
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static NVGGlyphPosition callocStack(MemoryStack stack)
Returns a newNVGGlyphPosition
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static NVGGlyphPosition.Buffer mallocStack(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static NVGGlyphPosition.Buffer callocStack(int capacity)
Returns a newNVGGlyphPosition.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static NVGGlyphPosition.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newNVGGlyphPosition.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static NVGGlyphPosition.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newNVGGlyphPosition.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
CallsNVGGlyphPosition.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-