Package org.lwjgl.stb

Class STBTTBakedChar

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

    public class STBTTBakedChar
    extends Struct
    implements NativeResource
    Baked character data, returned by BakeFontBitmap.


     struct stbtt_bakedchar {
         unsigned short x0;
         unsigned short y0;
         unsigned short x1;
         unsigned short y1;
         float xoff;
         float yoff;
         float xadvance;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • X0, Y0, X1, Y1, XOFF, YOFF, XADVANCE

        The struct member offsets.
    • Constructor Detail

      • STBTTBakedChar

        public STBTTBakedChar​(java.nio.ByteBuffer container)
        Creates a STBTTBakedChar 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 short x0()
        Returns the value of the x0 field.
      • y0

        public short y0()
        Returns the value of the y0 field.
      • x1

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

        public short y1()
        Returns the value of the y1 field.
      • xoff

        public float xoff()
        Returns the value of the xoff field.
      • yoff

        public float yoff()
        Returns the value of the yoff field.
      • xadvance

        public float xadvance()
        Returns the value of the xadvance field.
      • createSafe

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

        public static STBTTBakedChar.Buffer create​(long address,
                                                   int capacity)
        Create a STBTTBakedChar.Buffer instance at the specified memory.
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        public static STBTTBakedChar.Buffer createSafe​(long address,
                                                       int capacity)
        Like create, but returns null if address is NULL.
      • nx0

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

        public static short ny0​(long struct)
        Unsafe version of y0().
      • nx1

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

        public static short ny1​(long struct)
        Unsafe version of y1().
      • nxoff

        public static float nxoff​(long struct)
        Unsafe version of xoff().
      • nyoff

        public static float nyoff​(long struct)
        Unsafe version of yoff().
      • nxadvance

        public static float nxadvance​(long struct)
        Unsafe version of xadvance().