Package org.lwjgl.stb

Class STBTTAlignedQuad

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class STBTTAlignedQuad
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Quad used for drawing a baked character, returned by GetBakedQuad.

    Layout

    
     struct stbtt_aligned_quad {
         float x0;
         float y0;
         float s0;
         float t0;
         float x1;
         float y1;
         float s1;
         float t1;
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  STBTTAlignedQuad.Buffer
      An array of STBTTAlignedQuad structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int S0
      S1
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int T0
      T1
      X0
      X1
      Y0
      Y1
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      STBTTAlignedQuad​(java.nio.ByteBuffer container)
      Creates a STBTTAlignedQuad instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • X0, Y0, S0, T0, X1, Y1, S1, T1

        The struct member offsets.
    • Constructor Detail

      • STBTTAlignedQuad

        public STBTTAlignedQuad​(java.nio.ByteBuffer container)
        Creates a STBTTAlignedQuad 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.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • x0

        public float x0()
        Returns the value of the x0 field.
      • y0

        public float y0()
        Returns the value of the y0 field.
      • s0

        public float s0()
        Returns the value of the s0 field.
      • t0

        public float t0()
        Returns the value of the t0 field.
      • x1

        public float x1()
        Returns the value of the x1 field.
      • y1

        public float y1()
        Returns the value of the y1 field.
      • s1

        public float s1()
        Returns the value of the s1 field.
      • t1

        public float t1()
        Returns the value of the t1 field.
      • malloc

        public static STBTTAlignedQuad malloc()
        Returns a new STBTTAlignedQuad instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static STBTTAlignedQuad calloc()
        Returns a new STBTTAlignedQuad instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static STBTTAlignedQuad create()
        Returns a new STBTTAlignedQuad instance allocated with BufferUtils.
      • create

        public static STBTTAlignedQuad create​(long address)
        Returns a new STBTTAlignedQuad instance for the specified memory address.
      • createSafe

        @Nullable
        public static STBTTAlignedQuad createSafe​(long address)
        Like create, but returns null if address is NULL.
      • createSafe

        @Nullable
        public static STBTTAlignedQuad.Buffer createSafe​(long address,
                                                         int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static STBTTAlignedQuad mallocStack()
        Returns a new STBTTAlignedQuad instance allocated on the thread-local MemoryStack.
      • callocStack

        public static STBTTAlignedQuad callocStack()
        Returns a new STBTTAlignedQuad instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static STBTTAlignedQuad mallocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new STBTTAlignedQuad instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static STBTTAlignedQuad callocStack​(org.lwjgl.system.MemoryStack stack)
        Returns a new STBTTAlignedQuad instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static STBTTAlignedQuad.Buffer callocStack​(int capacity)
        Returns a new STBTTAlignedQuad.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static STBTTAlignedQuad.Buffer mallocStack​(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new STBTTAlignedQuad.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static STBTTAlignedQuad.Buffer callocStack​(int capacity,
                                                          org.lwjgl.system.MemoryStack stack)
        Returns a new STBTTAlignedQuad.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nx0

        public static float nx0​(long struct)
        Unsafe version of x0().
      • ny0

        public static float ny0​(long struct)
        Unsafe version of y0().
      • ns0

        public static float ns0​(long struct)
        Unsafe version of s0().
      • nt0

        public static float nt0​(long struct)
        Unsafe version of t0().
      • nx1

        public static float nx1​(long struct)
        Unsafe version of x1().
      • ny1

        public static float ny1​(long struct)
        Unsafe version of y1().
      • ns1

        public static float ns1​(long struct)
        Unsafe version of s1().
      • nt1

        public static float nt1​(long struct)
        Unsafe version of t1().