Package org.lwjgl.nanovg
Class UIRect
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.nanovg.UIRect
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class UIRect extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourcelayout rectangleLayout
struct UIrect { union { int v[4]; struct { int x; int y; int w; int h; }; }; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUIRect.BufferAn array ofUIRectstructs.
-
Constructor Summary
Constructors Constructor Description UIRect(java.nio.ByteBuffer container)Creates aUIRectinstance 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 UIRectcalloc()Returns a newUIRectinstance allocated withmemCalloc.static UIRect.Buffercalloc(int capacity)Returns a newUIRect.Bufferinstance allocated withmemCalloc.static UIRect.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newUIRect.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static UIRectcalloc(org.lwjgl.system.MemoryStack stack)Returns a newUIRectinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static UIRectcallocStack()Deprecated.static UIRect.BuffercallocStack(int capacity)Deprecated.static UIRect.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static UIRectcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static UIRectcreate()Returns a newUIRectinstance allocated withBufferUtils.static UIRect.Buffercreate(int capacity)Returns a newUIRect.Bufferinstance allocated withBufferUtils.static UIRectcreate(long address)Returns a newUIRectinstance for the specified memory address.static UIRect.Buffercreate(long address, int capacity)Create aUIRect.Bufferinstance at the specified memory.static UIRectcreateSafe(long address)static UIRect.BuffercreateSafe(long address, int capacity)inth()UIRecth(int value)Sets the specified value to thehfield.static UIRectmalloc()Returns a newUIRectinstance allocated withmemAlloc.static UIRect.Buffermalloc(int capacity)Returns a newUIRect.Bufferinstance allocated withmemAlloc.static UIRect.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newUIRect.Bufferinstance allocated on the specifiedMemoryStack.static UIRectmalloc(org.lwjgl.system.MemoryStack stack)Returns a newUIRectinstance allocated on the specifiedMemoryStack.static UIRectmallocStack()Deprecated.static UIRect.BuffermallocStack(int capacity)Deprecated.static UIRect.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static UIRectmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnh(long struct)Unsafe version ofh().static voidnh(long struct, int value)Unsafe version ofh.static java.nio.IntBuffernv(long struct)Unsafe version ofv().static intnv(long struct, int index)Unsafe version ofv.static voidnv(long struct, int index, int value)Unsafe version ofv.static voidnv(long struct, java.nio.IntBuffer value)Unsafe version ofv.static intnw(long struct)Unsafe version ofw().static voidnw(long struct, int value)Unsafe version ofw.static intnx(long struct)Unsafe version ofx().static voidnx(long struct, int value)Unsafe version ofx.static intny(long struct)Unsafe version ofy().static voidny(long struct, int value)Unsafe version ofy.UIRectset(UIRect src)Copies the specified struct data to this struct.intsizeof()java.nio.IntBufferv()intv(int index)UIRectv(int index, int value)Sets the specified value at the specified index of thevfield.UIRectv(java.nio.IntBuffer value)Copies the specifiedIntBufferto thevfield.intw()UIRectw(int value)Sets the specified value to thewfield.intx()UIRectx(int value)Sets the specified value to thexfield.inty()UIRecty(int value)Sets the specified value to theyfield.
-
-
-
Constructor Detail
-
UIRect
public UIRect(java.nio.ByteBuffer container)
Creates aUIRectinstance 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
-
v
public java.nio.IntBuffer v()
- Returns:
- a
IntBufferview of thevfield.
-
v
public int v(int index)
- Returns:
- the value at the specified index of the
vfield.
-
x
public int x()
- Returns:
- the value of the
xfield.
-
y
public int y()
- Returns:
- the value of the
yfield.
-
w
public int w()
- Returns:
- the value of the
wfield.
-
h
public int h()
- Returns:
- the value of the
hfield.
-
v
public UIRect v(java.nio.IntBuffer value)
Copies the specifiedIntBufferto thevfield.
-
v
public UIRect v(int index, int value)
Sets the specified value at the specified index of thevfield.
-
x
public UIRect x(int value)
Sets the specified value to thexfield.
-
y
public UIRect y(int value)
Sets the specified value to theyfield.
-
w
public UIRect w(int value)
Sets the specified value to thewfield.
-
h
public UIRect h(int value)
Sets the specified value to thehfield.
-
set
public UIRect set(UIRect src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static UIRect malloc()
Returns a newUIRectinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static UIRect calloc()
Returns a newUIRectinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static UIRect create()
Returns a newUIRectinstance allocated withBufferUtils.
-
create
public static UIRect create(long address)
Returns a newUIRectinstance for the specified memory address.
-
createSafe
@Nullable public static UIRect createSafe(long address)
-
malloc
public static UIRect.Buffer malloc(int capacity)
Returns a newUIRect.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static UIRect.Buffer calloc(int capacity)
Returns a newUIRect.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static UIRect.Buffer create(int capacity)
Returns a newUIRect.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static UIRect.Buffer create(long address, int capacity)
Create aUIRect.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static UIRect.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static UIRect mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static UIRect callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static UIRect mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static UIRect callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static UIRect.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static UIRect.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static UIRect.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 UIRect.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static UIRect malloc(org.lwjgl.system.MemoryStack stack)
Returns a newUIRectinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static UIRect calloc(org.lwjgl.system.MemoryStack stack)
Returns a newUIRectinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static UIRect.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newUIRect.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static UIRect.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newUIRect.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nv
public static java.nio.IntBuffer nv(long struct)
Unsafe version ofv().
-
nv
public static int nv(long struct, int index)Unsafe version ofv.
-
nx
public static int nx(long struct)
Unsafe version ofx().
-
ny
public static int ny(long struct)
Unsafe version ofy().
-
nw
public static int nw(long struct)
Unsafe version ofw().
-
nh
public static int nh(long struct)
Unsafe version ofh().
-
nv
public static void nv(long struct, java.nio.IntBuffer value)Unsafe version ofv.
-
nv
public static void nv(long struct, int index, int value)Unsafe version ofv.
-
nx
public static void nx(long struct, int value)Unsafe version ofx.
-
ny
public static void ny(long struct, int value)Unsafe version ofy.
-
nw
public static void nw(long struct, int value)Unsafe version ofw.
-
nh
public static void nh(long struct, int value)Unsafe version ofh.
-
-