public class NkRect
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
struct nk_rect {
float x;
float y;
float w;
float h;
}| Modifier and Type | Class and Description |
|---|---|
static class |
NkRect.Buffer
An array of
NkRect structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
H
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
W
The struct member offsets.
|
static int |
X
The struct member offsets.
|
static int |
Y
The struct member offsets.
|
| Constructor and Description |
|---|
NkRect(java.nio.ByteBuffer container)
Creates a
NkRect instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static NkRect |
calloc()
Returns a new
NkRect instance allocated with memCalloc. |
static NkRect.Buffer |
calloc(int capacity)
Returns a new
NkRect.Buffer instance allocated with memCalloc. |
static NkRect |
callocStack()
Returns a new
NkRect instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkRect.Buffer |
callocStack(int capacity)
Returns a new
NkRect.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static NkRect.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkRect.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkRect |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkRect instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static NkRect |
create()
Returns a new
NkRect instance allocated with BufferUtils. |
static NkRect.Buffer |
create(int capacity)
Returns a new
NkRect.Buffer instance allocated with BufferUtils. |
static NkRect |
create(long address)
Returns a new
NkRect instance for the specified memory address. |
static NkRect.Buffer |
create(long address,
int capacity)
Create a
NkRect.Buffer instance at the specified memory. |
static NkRect |
createSafe(long address)
|
static NkRect.Buffer |
createSafe(long address,
int capacity)
|
float |
h()
Returns the value of the
h field. |
NkRect |
h(float value)
Sets the specified value to the
h field. |
static NkRect |
malloc()
Returns a new
NkRect instance allocated with memAlloc. |
static NkRect.Buffer |
malloc(int capacity)
Returns a new
NkRect.Buffer instance allocated with memAlloc. |
static NkRect |
mallocStack()
Returns a new
NkRect instance allocated on the thread-local MemoryStack. |
static NkRect.Buffer |
mallocStack(int capacity)
Returns a new
NkRect.Buffer instance allocated on the thread-local MemoryStack. |
static NkRect.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
NkRect.Buffer instance allocated on the specified MemoryStack. |
static NkRect |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
NkRect instance allocated on the specified MemoryStack. |
static float |
nh(long struct)
Unsafe version of
h(). |
static void |
nh(long struct,
float value)
Unsafe version of
h. |
static float |
nw(long struct)
Unsafe version of
w(). |
static void |
nw(long struct,
float value)
Unsafe version of
w. |
static float |
nx(long struct)
Unsafe version of
x(). |
static void |
nx(long struct,
float value)
Unsafe version of
x. |
static float |
ny(long struct)
Unsafe version of
y(). |
static void |
ny(long struct,
float value)
Unsafe version of
y. |
NkRect |
set(float x,
float y,
float w,
float h)
Initializes this struct with the specified values.
|
NkRect |
set(NkRect src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
float |
w()
Returns the value of the
w field. |
NkRect |
w(float value)
Sets the specified value to the
w field. |
float |
x()
Returns the value of the
x field. |
NkRect |
x(float value)
Sets the specified value to the
x field. |
float |
y()
Returns the value of the
y field. |
NkRect |
y(float value)
Sets the specified value to the
y field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int X
public static final int Y
public static final int W
public static final int H
public NkRect(java.nio.ByteBuffer container)
NkRect instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic float x()
x field.public float y()
y field.public float w()
w field.public float h()
h field.public NkRect x(float value)
x field.public NkRect y(float value)
y field.public NkRect w(float value)
w field.public NkRect h(float value)
h field.public NkRect set(float x, float y, float w, float h)
public NkRect set(NkRect src)
src - the source structpublic static NkRect malloc()
NkRect instance allocated with memAlloc. The instance must be explicitly freed.public static NkRect calloc()
NkRect instance allocated with memCalloc. The instance must be explicitly freed.public static NkRect create()
NkRect instance allocated with BufferUtils.public static NkRect create(long address)
NkRect instance for the specified memory address.@Nullable public static NkRect createSafe(long address)
public static NkRect.Buffer malloc(int capacity)
NkRect.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkRect.Buffer calloc(int capacity)
NkRect.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static NkRect.Buffer create(int capacity)
NkRect.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static NkRect.Buffer create(long address, int capacity)
NkRect.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static NkRect.Buffer createSafe(long address, int capacity)
public static NkRect mallocStack()
NkRect instance allocated on the thread-local MemoryStack.public static NkRect callocStack()
NkRect instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static NkRect mallocStack(org.lwjgl.system.MemoryStack stack)
NkRect instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static NkRect callocStack(org.lwjgl.system.MemoryStack stack)
NkRect instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static NkRect.Buffer mallocStack(int capacity)
NkRect.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static NkRect.Buffer callocStack(int capacity)
NkRect.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static NkRect.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkRect.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static NkRect.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
NkRect.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static float nx(long struct)
x().public static float ny(long struct)
y().public static float nw(long struct)
w().public static float nh(long struct)
h().public static void nx(long struct,
float value)
x.public static void ny(long struct,
float value)
y.public static void nw(long struct,
float value)
w.public static void nh(long struct,
float value)
h.Copyright LWJGL. All Rights Reserved. License terms.