public class RECT
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
left – the x-coordinate of the upper-left corner of the rectangletop – the y-coordinate of the upper-left corner of the rectangleright – the x-coordinate of the lower-right corner of the rectanglebottom – the y-coordinate of the lower-right corner of the rectangle
struct RECT {
LONG left;
LONG top;
LONG right;
LONG bottom;
}| Modifier and Type | Class and Description |
|---|---|
static class |
RECT.Buffer
An array of
RECT structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BOTTOM
The struct member offsets.
|
static int |
LEFT
The struct member offsets.
|
static int |
RIGHT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
TOP
The struct member offsets.
|
| Constructor and Description |
|---|
RECT(java.nio.ByteBuffer container)
Creates a
RECT instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
int |
bottom()
Returns the value of the
bottom field. |
RECT |
bottom(int value)
Sets the specified value to the
bottom field. |
static RECT |
calloc()
Returns a new
RECT instance allocated with memCalloc. |
static RECT.Buffer |
calloc(int capacity)
Returns a new
RECT.Buffer instance allocated with memCalloc. |
static RECT |
callocStack()
Returns a new
RECT instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static RECT.Buffer |
callocStack(int capacity)
Returns a new
RECT.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static RECT.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
RECT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static RECT |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
RECT instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static RECT |
create()
Returns a new
RECT instance allocated with BufferUtils. |
static RECT.Buffer |
create(int capacity)
Returns a new
RECT.Buffer instance allocated with BufferUtils. |
static RECT |
create(long address)
Returns a new
RECT instance for the specified memory address. |
static RECT.Buffer |
create(long address,
int capacity)
Create a
RECT.Buffer instance at the specified memory. |
static RECT |
createSafe(long address)
|
static RECT.Buffer |
createSafe(long address,
int capacity)
|
int |
left()
Returns the value of the
left field. |
RECT |
left(int value)
Sets the specified value to the
left field. |
static RECT |
malloc()
Returns a new
RECT instance allocated with memAlloc. |
static RECT.Buffer |
malloc(int capacity)
Returns a new
RECT.Buffer instance allocated with memAlloc. |
static RECT |
mallocStack()
Returns a new
RECT instance allocated on the thread-local MemoryStack. |
static RECT.Buffer |
mallocStack(int capacity)
Returns a new
RECT.Buffer instance allocated on the thread-local MemoryStack. |
static RECT.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
RECT.Buffer instance allocated on the specified MemoryStack. |
static RECT |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
RECT instance allocated on the specified MemoryStack. |
static int |
nbottom(long struct)
Unsafe version of
bottom(). |
static void |
nbottom(long struct,
int value)
Unsafe version of
bottom. |
static int |
nleft(long struct)
Unsafe version of
left(). |
static void |
nleft(long struct,
int value)
Unsafe version of
left. |
static int |
nright(long struct)
Unsafe version of
right(). |
static void |
nright(long struct,
int value)
Unsafe version of
right. |
static int |
ntop(long struct)
Unsafe version of
top(). |
static void |
ntop(long struct,
int value)
Unsafe version of
top. |
int |
right()
Returns the value of the
right field. |
RECT |
right(int value)
Sets the specified value to the
right field. |
RECT |
set(int left,
int top,
int right,
int bottom)
Initializes this struct with the specified values.
|
RECT |
set(RECT src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
top()
Returns the value of the
top field. |
RECT |
top(int value)
Sets the specified value to the
top field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int LEFT
public static final int TOP
public static final int RIGHT
public static final int BOTTOM
public RECT(java.nio.ByteBuffer container)
RECT 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 int left()
left field.public int top()
top field.public int right()
right field.public int bottom()
bottom field.public RECT left(int value)
left field.public RECT top(int value)
top field.public RECT right(int value)
right field.public RECT bottom(int value)
bottom field.public RECT set(int left, int top, int right, int bottom)
public RECT set(RECT src)
src - the source structpublic static RECT malloc()
RECT instance allocated with memAlloc. The instance must be explicitly freed.public static RECT calloc()
RECT instance allocated with memCalloc. The instance must be explicitly freed.public static RECT create()
RECT instance allocated with BufferUtils.public static RECT create(long address)
RECT instance for the specified memory address.@Nullable public static RECT createSafe(long address)
public static RECT.Buffer malloc(int capacity)
RECT.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static RECT.Buffer calloc(int capacity)
RECT.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static RECT.Buffer create(int capacity)
RECT.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static RECT.Buffer create(long address, int capacity)
RECT.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static RECT.Buffer createSafe(long address, int capacity)
public static RECT mallocStack()
RECT instance allocated on the thread-local MemoryStack.public static RECT callocStack()
RECT instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static RECT mallocStack(org.lwjgl.system.MemoryStack stack)
RECT instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static RECT callocStack(org.lwjgl.system.MemoryStack stack)
RECT instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static RECT.Buffer mallocStack(int capacity)
RECT.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static RECT.Buffer callocStack(int capacity)
RECT.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static RECT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
RECT.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static RECT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
RECT.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 int nleft(long struct)
left().public static int ntop(long struct)
top().public static int nright(long struct)
right().public static int nbottom(long struct)
bottom().public static void nleft(long struct,
int value)
left.public static void ntop(long struct,
int value)
top.public static void nright(long struct,
int value)
right.public static void nbottom(long struct,
int value)
bottom.Copyright LWJGL. All Rights Reserved. License terms.