Package org.lwjgl.stb

Class STBTTAlignedQuad

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

    public class STBTTAlignedQuad
    extends Struct
    implements 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;
     }
    • 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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class 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​(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​(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​(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
      • 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().