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.NativeResourceA packed rectangle.Member documentation
id– reserved for your usew– input widthh– input heightx– output x coordinatey– output y coordinatewas_packed– non-zero if valid packing
Layout
struct stbrp_rect { int id; stbrp_coord w; stbrp_coord h; stbrp_coord x; stbrp_coord y; int was_packed; }
-
-
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 Modifier and Type Method Description static STBRPRectcalloc()Returns a newSTBRPRectinstance allocated withmemCalloc.static STBRPRect.Buffercalloc(int capacity)Returns a newSTBRPRect.Bufferinstance allocated withmemCalloc.static STBRPRectcallocStack()Returns a newSTBRPRectinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static STBRPRect.BuffercallocStack(int capacity)Returns a newSTBRPRect.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static STBRPRect.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBRPRect.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static STBRPRectcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newSTBRPRectinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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)shorth()Returns the value of thehfield.STBRPRecth(short value)Sets the specified value to thehfield.intid()Returns the value of theidfield.STBRPRectid(int value)Sets the specified value to theidfield.static STBRPRectmalloc()Returns a newSTBRPRectinstance allocated withmemAlloc.static STBRPRect.Buffermalloc(int capacity)Returns a newSTBRPRect.Bufferinstance allocated withmemAlloc.static STBRPRectmallocStack()Returns a newSTBRPRectinstance allocated on the thread-localMemoryStack.static STBRPRect.BuffermallocStack(int capacity)Returns a newSTBRPRect.Bufferinstance allocated on the thread-localMemoryStack.static STBRPRect.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newSTBRPRect.Bufferinstance allocated on the specifiedMemoryStack.static STBRPRectmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newSTBRPRectinstance allocated on the specifiedMemoryStack.static shortnh(long struct)Unsafe version ofh().static voidnh(long struct, short value)Unsafe version ofh.static intnid(long struct)Unsafe version ofid().static voidnid(long struct, int value)Unsafe version ofid.static shortnw(long struct)Unsafe version ofw().static voidnw(long struct, short 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 shortnx(long struct)Unsafe version ofx().static voidnx(long struct, short value)Unsafe version ofx.static shortny(long struct)Unsafe version ofy().static voidny(long struct, short value)Unsafe version ofy.STBRPRectset(int id, short w, short h, short x, short y, boolean was_packed)Initializes this struct with the specified values.STBRPRectset(STBRPRect src)Copies the specified struct data to this struct.intsizeof()shortw()Returns the value of thewfield.STBRPRectw(short value)Sets the specified value to thewfield.booleanwas_packed()Returns the value of thewas_packedfield.STBRPRectwas_packed(boolean value)Sets the specified value to thewas_packedfield.shortx()Returns the value of thexfield.STBRPRectx(short value)Sets the specified value to thexfield.shorty()Returns the value of theyfield.STBRPRecty(short value)Sets the specified value to theyfield.
-
-
-
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()
Returns the value of theidfield.
-
w
public short w()
Returns the value of thewfield.
-
h
public short h()
Returns the value of thehfield.
-
x
public short x()
Returns the value of thexfield.
-
y
public short y()
Returns the value of theyfield.
-
was_packed
public boolean was_packed()
Returns the value of thewas_packedfield.
-
id
public STBRPRect id(int value)
Sets the specified value to theidfield.
-
w
public STBRPRect w(short value)
Sets the specified value to thewfield.
-
h
public STBRPRect h(short value)
Sets the specified value to thehfield.
-
x
public STBRPRect x(short value)
Sets the specified value to thexfield.
-
y
public STBRPRect y(short value)
Sets the specified value to theyfield.
-
was_packed
public STBRPRect was_packed(boolean value)
Sets the specified value to thewas_packedfield.
-
set
public STBRPRect set(int id, short w, short h, short x, short 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
public static STBRPRect mallocStack()
Returns a newSTBRPRectinstance allocated on the thread-localMemoryStack.
-
callocStack
public static STBRPRect callocStack()
Returns a newSTBRPRectinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static STBRPRect mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSTBRPRectinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static STBRPRect callocStack(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
-
mallocStack
public static STBRPRect.Buffer mallocStack(int capacity)
Returns a newSTBRPRect.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static STBRPRect.Buffer callocStack(int capacity)
Returns a newSTBRPRect.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static STBRPRect.Buffer mallocStack(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
-
callocStack
public static STBRPRect.Buffer callocStack(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 short nw(long struct)
Unsafe version ofw().
-
nh
public static short nh(long struct)
Unsafe version ofh().
-
nx
public static short nx(long struct)
Unsafe version ofx().
-
ny
public static short 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, short value)Unsafe version ofw.
-
nh
public static void nh(long struct, short value)Unsafe version ofh.
-
nx
public static void nx(long struct, short value)Unsafe version ofx.
-
ny
public static void ny(long struct, short value)Unsafe version ofy.
-
nwas_packed
public static void nwas_packed(long struct, int value)Unsafe version ofwas_packed.
-
-