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 classNVGGlyphPosition.BufferAn array ofNVGGlyphPositionstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aNVGGlyphPositioninstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static NVGGlyphPositioncalloc()Returns a newNVGGlyphPositioninstance allocated withmemCalloc.static NVGGlyphPosition.Buffercalloc(int capacity)Returns a newNVGGlyphPosition.Bufferinstance allocated withmemCalloc.static NVGGlyphPositioncallocStack()Returns a newNVGGlyphPositioninstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NVGGlyphPosition.BuffercallocStack(int capacity)Returns a newNVGGlyphPosition.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static NVGGlyphPosition.BuffercallocStack(int capacity, MemoryStack stack)Returns a newNVGGlyphPosition.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGGlyphPositioncallocStack(MemoryStack stack)Returns a newNVGGlyphPositioninstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static NVGGlyphPositioncreate()Returns a newNVGGlyphPositioninstance allocated withBufferUtils.static NVGGlyphPosition.Buffercreate(int capacity)Returns a newNVGGlyphPosition.Bufferinstance allocated withBufferUtils.static NVGGlyphPositioncreate(long address)Returns a newNVGGlyphPositioninstance for the specified memory address ornullif the address isNULL.static NVGGlyphPosition.Buffercreate(long address, int capacity)Create aNVGGlyphPosition.Bufferinstance at the specified memory.static NVGGlyphPositionmalloc()Returns a newNVGGlyphPositioninstance allocated withmemAlloc.static NVGGlyphPosition.Buffermalloc(int capacity)Returns a newNVGGlyphPosition.Bufferinstance allocated withmemAlloc.static NVGGlyphPositionmallocStack()Returns a newNVGGlyphPositioninstance allocated on the thread-localMemoryStack.static NVGGlyphPosition.BuffermallocStack(int capacity)Returns a newNVGGlyphPosition.Bufferinstance allocated on the thread-localMemoryStack.static NVGGlyphPosition.BuffermallocStack(int capacity, MemoryStack stack)Returns a newNVGGlyphPosition.Bufferinstance allocated on the specifiedMemoryStack.static NVGGlyphPositionmallocStack(MemoryStack stack)Returns a newNVGGlyphPositioninstance allocated on the specifiedMemoryStack.floatmaxx()Returns the value of themaxxfield.NVGGlyphPositionmaxx(float value)Sets the specified value to themaxxfield.floatminx()Returns the value of theminxfield.NVGGlyphPositionminx(float value)Sets the specified value to theminxfield.NVGGlyphPositionnset(long struct)Unsafe version ofset.NVGGlyphPositionset(long str, float x, float minx, float maxx)Initializes this struct with the specified values.NVGGlyphPositionset(NVGGlyphPosition src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).longstr()Returns the value of thestrfield.NVGGlyphPositionstr(long value)Sets the specified value to thestrfield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)CallsNVGGlyphPosition.validate(long)for each struct contained in the specified struct array.floatx()Returns the value of thexfield.NVGGlyphPositionx(float value)Sets the specified value to thexfield.-
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 aNVGGlyphPositioninstance 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()
Description copied from class:StructReturns thesizeof(struct).
-
str
public long str()
Returns the value of thestrfield.
-
x
public float x()
Returns the value of thexfield.
-
minx
public float minx()
Returns the value of theminxfield.
-
maxx
public float maxx()
Returns the value of themaxxfield.
-
str
public NVGGlyphPosition str(long value)
Sets the specified value to thestrfield.
-
x
public NVGGlyphPosition x(float value)
Sets the specified value to thexfield.
-
minx
public NVGGlyphPosition minx(float value)
Sets the specified value to theminxfield.
-
maxx
public NVGGlyphPosition maxx(float value)
Sets the specified value to themaxxfield.
-
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 newNVGGlyphPositioninstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static NVGGlyphPosition calloc()
Returns a newNVGGlyphPositioninstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static NVGGlyphPosition create()
Returns a newNVGGlyphPositioninstance allocated withBufferUtils.
-
create
public static NVGGlyphPosition create(long address)
Returns a newNVGGlyphPositioninstance for the specified memory address ornullif the address isNULL.
-
malloc
public static NVGGlyphPosition.Buffer malloc(int capacity)
Returns a newNVGGlyphPosition.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static NVGGlyphPosition.Buffer calloc(int capacity)
Returns a newNVGGlyphPosition.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static NVGGlyphPosition.Buffer create(int capacity)
Returns a newNVGGlyphPosition.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static NVGGlyphPosition.Buffer create(long address, int capacity)
Create aNVGGlyphPosition.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static NVGGlyphPosition mallocStack()
Returns a newNVGGlyphPositioninstance allocated on the thread-localMemoryStack.
-
callocStack
public static NVGGlyphPosition callocStack()
Returns a newNVGGlyphPositioninstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static NVGGlyphPosition mallocStack(MemoryStack stack)
Returns a newNVGGlyphPositioninstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static NVGGlyphPosition callocStack(MemoryStack stack)
Returns a newNVGGlyphPositioninstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static NVGGlyphPosition.Buffer callocStack(int capacity)
Returns a newNVGGlyphPosition.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static NVGGlyphPosition.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newNVGGlyphPosition.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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
-
-