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 and Description static classSTBRPRect.BufferAn array ofSTBRPRectstructs.
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and 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)static STBRPRect.Buffercreate(long address, int capacity)Create aSTBRPRect.Bufferinstance at the specified memory.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.STBRPRectnset(long struct)Unsafe version ofset.STBRPRectset(int id, short w, short h, short x, short y, int was_packed)Initializes this struct with the specified values.STBRPRectset(STBRPRect src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).shortw()Returns the value of thewfield.STBRPRectw(short value)Sets the specified value to thewfield.intwas_packed()Returns the value of thewas_packedfield.STBRPRectwas_packed(int 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()
Description copied from class:org.lwjgl.system.StructReturns thesizeof(struct).- 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 int 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(int value)
Sets the specified value to thewas_packedfield.
-
set
public STBRPRect set(int id, short w, short h, short x, short y, int 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)
-
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
-
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
-
-