Package org.lwjgl.stb
Class STBRPRect
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.stb.STBRPRect
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class STBRPRect extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSTBRPRect.BufferAn array ofSTBRPRectstructs.
-
Constructor Summary
Constructors Constructor Description STBRPRect(java.nio.ByteBuffer container)Creates aSTBRPRectinstance 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 STBRPRectcalloc()Returns a newSTBRPRectinstance allocated withmemCalloc.static STBRPRect.Buffercalloc(int capacity)Returns a newSTBRPRect.Bufferinstance allocated withmemCalloc.static STBRPRect.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBRPRect.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBRPRectcalloc(org.lwjgl.system.MemoryStack stack)Returns a newSTBRPRectinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBRPRectcallocStack()Deprecated.static STBRPRect.BuffercallocStack(int capacity)Deprecated.static STBRPRect.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static STBRPRectcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static STBRPRectcreate()Returns a newSTBRPRectinstance allocated withBufferUtils.static STBRPRect.Buffercreate(int capacity)Returns a newSTBRPRect.Bufferinstance allocated withBufferUtils.static STBRPRectcreate(long address)Returns a newSTBRPRectinstance for the specified memory address.static STBRPRect.Buffercreate(long address, int capacity)Create aSTBRPRect.Bufferinstance at the specified memory.static STBRPRectcreateSafe(long address)static STBRPRect.BuffercreateSafe(long address, int capacity)inth()input heightSTBRPRecth(int value)Sets the specified value to theh()field.intid()reserved for your useSTBRPRectid(int value)Sets the specified value to theid()field.static STBRPRectmalloc()Returns a newSTBRPRectinstance allocated withmemAlloc.static STBRPRect.Buffermalloc(int capacity)Returns a newSTBRPRect.Bufferinstance allocated withmemAlloc.static STBRPRect.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBRPRect.Bufferinstance allocated on the specifiedMemoryStack.static STBRPRectmalloc(org.lwjgl.system.MemoryStack stack)Returns a newSTBRPRectinstance allocated on the specifiedMemoryStack.static STBRPRectmallocStack()Deprecated.static STBRPRect.BuffermallocStack(int capacity)Deprecated.static STBRPRect.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static STBRPRectmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnh(long struct)Unsafe version ofh().static voidnh(long struct, int value)Unsafe version ofh.static intnid(long struct)Unsafe version ofid().static voidnid(long struct, int value)Unsafe version ofid.static intnw(long struct)Unsafe version ofw().static voidnw(long struct, int value)Unsafe version ofw.static intnwas_packed(long struct)Unsafe version ofwas_packed().static voidnwas_packed(long struct, int value)Unsafe version ofwas_packed.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.STBRPRectset(int id, int w, int h, int x, int y, boolean was_packed)Initializes this struct with the specified values.STBRPRectset(STBRPRect src)Copies the specified struct data to this struct.intsizeof()intw()input widthSTBRPRectw(int value)Sets the specified value to thew()field.booleanwas_packed()non-zero if valid packingSTBRPRectwas_packed(boolean value)Sets the specified value to thewas_packed()field.intx()output x coordinateSTBRPRectx(int value)Sets the specified value to thex()field.inty()output y coordinateSTBRPRecty(int value)Sets the specified value to they()field.
-
-
-
Constructor Detail
-
STBRPRect
public STBRPRect(java.nio.ByteBuffer container)
Creates aSTBRPRectinstance 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
-
id
public int id()
reserved for your use
-
w
public int w()
input width
-
h
public int h()
input height
-
x
public int x()
output x coordinate
-
y
public int y()
output y coordinate
-
was_packed
public boolean was_packed()
non-zero if valid packing
-
was_packed
public STBRPRect was_packed(boolean value)
Sets the specified value to thewas_packed()field.
-
set
public STBRPRect set(int id, int w, int h, int x, int y, boolean was_packed)
Initializes this struct with the specified values.
-
set
public STBRPRect set(STBRPRect src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static STBRPRect malloc()
Returns a newSTBRPRectinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static STBRPRect calloc()
Returns a newSTBRPRectinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static STBRPRect create()
Returns a newSTBRPRectinstance allocated withBufferUtils.
-
create
public static STBRPRect create(long address)
Returns a newSTBRPRectinstance for the specified memory address.
-
createSafe
@Nullable public static STBRPRect createSafe(long address)
-
malloc
public static STBRPRect.Buffer malloc(int capacity)
Returns a newSTBRPRect.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static STBRPRect.Buffer calloc(int capacity)
Returns a newSTBRPRect.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static STBRPRect.Buffer create(int capacity)
Returns a newSTBRPRect.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static STBRPRect.Buffer create(long address, int capacity)
Create aSTBRPRect.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static STBRPRect.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static STBRPRect mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static STBRPRect callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static STBRPRect mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static STBRPRect callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static STBRPRect.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static STBRPRect.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static STBRPRect.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 STBRPRect.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static STBRPRect malloc(org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPRectinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static STBRPRect calloc(org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPRectinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static STBRPRect.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPRect.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static STBRPRect.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPRect.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nid
public static int nid(long struct)
Unsafe version ofid().
-
nw
public static int nw(long struct)
Unsafe version ofw().
-
nh
public static int nh(long struct)
Unsafe version ofh().
-
nx
public static int nx(long struct)
Unsafe version ofx().
-
ny
public static int ny(long struct)
Unsafe version ofy().
-
nwas_packed
public static int nwas_packed(long struct)
Unsafe version ofwas_packed().
-
nid
public static void nid(long struct, int value)Unsafe version ofid.
-
nw
public static void nw(long struct, int value)Unsafe version ofw.
-
nh
public static void nh(long struct, int value)Unsafe version ofh.
-
nx
public static void nx(long struct, int value)Unsafe version ofx.
-
ny
public static void ny(long struct, int value)Unsafe version ofy.
-
nwas_packed
public static void nwas_packed(long struct, int value)Unsafe version ofwas_packed.
-
-