Class NkFontGlyph

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NkFontGlyph>
org.lwjgl.nuklear.NkFontGlyph
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

public class NkFontGlyph extends org.lwjgl.system.Struct<NkFontGlyph> implements org.lwjgl.system.NativeResource

Layout


 struct nk_font_glyph {
     nk_rune codepoint;
     float xadvance;
     float x0;
     float y0;
     float x1;
     float y1;
     float w;
     float h;
     float u0;
     float v0;
     float u1;
     float v1;
 }
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    An array of NkFontGlyph structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    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
    Creates a NkFontGlyph instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a new NkFontGlyph instance allocated with memCalloc.
    calloc(int capacity)
    Returns a new NkFontGlyph.Buffer instance allocated with memCalloc.
    calloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new NkFontGlyph.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
    calloc(org.lwjgl.system.MemoryStack stack)
    Returns a new NkFontGlyph instance allocated on the specified MemoryStack and initializes all its bits to zero.
    int
     
    codepoint(int value)
    Sets the specified value to the codepoint field.
    Returns a new NkFontGlyph instance allocated with BufferUtils.
    create(int capacity)
    Returns a new NkFontGlyph.Buffer instance allocated with BufferUtils.
    create(long address)
    Returns a new NkFontGlyph instance for the specified memory address.
    create(long address, int capacity)
    Create a NkFontGlyph.Buffer instance at the specified memory.
    static @Nullable NkFontGlyph
    createSafe(long address)
    Like create, but returns null if address is NULL.
    static @Nullable NkFontGlyph.Buffer
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    float
    h()
     
    h(float value)
    Sets the specified value to the h field.
    Returns a new NkFontGlyph instance allocated with memAlloc.
    malloc(int capacity)
    Returns a new NkFontGlyph.Buffer instance allocated with memAlloc.
    malloc(int capacity, org.lwjgl.system.MemoryStack stack)
    Returns a new NkFontGlyph.Buffer instance allocated on the specified MemoryStack.
    malloc(org.lwjgl.system.MemoryStack stack)
    Returns a new NkFontGlyph instance allocated on the specified MemoryStack.
    static int
    ncodepoint(long struct)
    Unsafe version of codepoint().
    static void
    ncodepoint(long struct, int value)
    Unsafe version of codepoint.
    static float
    nh(long struct)
    Unsafe version of h().
    static void
    nh(long struct, float value)
    Unsafe version of h.
    static float
    nu0(long struct)
    Unsafe version of u0().
    static void
    nu0(long struct, float value)
    Unsafe version of u0.
    static float
    nu1(long struct)
    Unsafe version of u1().
    static void
    nu1(long struct, float value)
    Unsafe version of u1.
    static float
    nv0(long struct)
    Unsafe version of v0().
    static void
    nv0(long struct, float value)
    Unsafe version of v0.
    static float
    nv1(long struct)
    Unsafe version of v1().
    static void
    nv1(long struct, float value)
    Unsafe version of v1.
    static float
    nw(long struct)
    Unsafe version of w().
    static void
    nw(long struct, float value)
    Unsafe version of w.
    static float
    nx0(long struct)
    Unsafe version of x0().
    static void
    nx0(long struct, float value)
    Unsafe version of x0.
    static float
    nx1(long struct)
    Unsafe version of x1().
    static void
    nx1(long struct, float value)
    Unsafe version of x1.
    static float
    nxadvance(long struct)
    Unsafe version of xadvance().
    static void
    nxadvance(long struct, float value)
    Unsafe version of xadvance.
    static float
    ny0(long struct)
    Unsafe version of y0().
    static void
    ny0(long struct, float value)
    Unsafe version of y0.
    static float
    ny1(long struct)
    Unsafe version of y1().
    static void
    ny1(long struct, float value)
    Unsafe version of y1.
    set(int codepoint, float xadvance, float x0, float y0, float x1, float y1, float w, float h, float u0, float v0, float u1, float v1)
    Initializes this struct with the specified values.
    Copies the specified struct data to this struct.
    int
     
    float
    u0()
     
    u0(float value)
    Sets the specified value to the u0 field.
    float
    u1()
     
    u1(float value)
    Sets the specified value to the u1 field.
    float
    v0()
     
    v0(float value)
    Sets the specified value to the v0 field.
    float
    v1()
     
    v1(float value)
    Sets the specified value to the v1 field.
    float
    w()
     
    w(float value)
    Sets the specified value to the w field.
    float
    x0()
     
    x0(float value)
    Sets the specified value to the x0 field.
    float
    x1()
     
    x1(float value)
    Sets the specified value to the x1 field.
    float
     
    xadvance(float value)
    Sets the specified value to the xadvance field.
    float
    y0()
     
    y0(float value)
    Sets the specified value to the y0 field.
    float
    y1()
     
    y1(float value)
    Sets the specified value to the y1 field.

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.lwjgl.system.NativeResource

    close, free
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • CODEPOINT

      public static final int CODEPOINT
      The struct member offsets.
    • XADVANCE

      public static final int XADVANCE
      The struct member offsets.
    • X0

      public static final int X0
      The struct member offsets.
    • Y0

      public static final int Y0
      The struct member offsets.
    • X1

      public static final int X1
      The struct member offsets.
    • Y1

      public static final int Y1
      The struct member offsets.
    • W

      public static final int W
      The struct member offsets.
    • H

      public static final int H
      The struct member offsets.
    • U0

      public static final int U0
      The struct member offsets.
    • V0

      public static final int V0
      The struct member offsets.
    • U1

      public static final int U1
      The struct member offsets.
    • V1

      public static final int V1
      The struct member offsets.
  • Constructor Details

    • NkFontGlyph

      public NkFontGlyph(ByteBuffer container)
      Creates a NkFontGlyph 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<NkFontGlyph>
    • codepoint

      public int codepoint()
      Returns:
      the value of the codepoint field.
    • xadvance

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

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

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

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

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

      public float w()
      Returns:
      the value of the w field.
    • h

      public float h()
      Returns:
      the value of the h field.
    • u0

      public float u0()
      Returns:
      the value of the u0 field.
    • v0

      public float v0()
      Returns:
      the value of the v0 field.
    • u1

      public float u1()
      Returns:
      the value of the u1 field.
    • v1

      public float v1()
      Returns:
      the value of the v1 field.
    • codepoint

      public NkFontGlyph codepoint(int value)
      Sets the specified value to the codepoint field.
    • xadvance

      public NkFontGlyph xadvance(float value)
      Sets the specified value to the xadvance field.
    • x0

      public NkFontGlyph x0(float value)
      Sets the specified value to the x0 field.
    • y0

      public NkFontGlyph y0(float value)
      Sets the specified value to the y0 field.
    • x1

      public NkFontGlyph x1(float value)
      Sets the specified value to the x1 field.
    • y1

      public NkFontGlyph y1(float value)
      Sets the specified value to the y1 field.
    • w

      public NkFontGlyph w(float value)
      Sets the specified value to the w field.
    • h

      public NkFontGlyph h(float value)
      Sets the specified value to the h field.
    • u0

      public NkFontGlyph u0(float value)
      Sets the specified value to the u0 field.
    • v0

      public NkFontGlyph v0(float value)
      Sets the specified value to the v0 field.
    • u1

      public NkFontGlyph u1(float value)
      Sets the specified value to the u1 field.
    • v1

      public NkFontGlyph v1(float value)
      Sets the specified value to the v1 field.
    • set

      public NkFontGlyph set(int codepoint, float xadvance, float x0, float y0, float x1, float y1, float w, float h, float u0, float v0, float u1, float v1)
      Initializes this struct with the specified values.
    • set

      public NkFontGlyph set(NkFontGlyph src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

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

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

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

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

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

      public static NkFontGlyph.Buffer malloc(int capacity)
      Returns a new NkFontGlyph.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static NkFontGlyph.Buffer calloc(int capacity)
      Returns a new NkFontGlyph.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static NkFontGlyph.Buffer create(int capacity)
      Returns a new NkFontGlyph.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

      public static NkFontGlyph malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new NkFontGlyph instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

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

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

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

      public static int ncodepoint(long struct)
      Unsafe version of codepoint().
    • nxadvance

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

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

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

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

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

      public static float nw(long struct)
      Unsafe version of w().
    • nh

      public static float nh(long struct)
      Unsafe version of h().
    • nu0

      public static float nu0(long struct)
      Unsafe version of u0().
    • nv0

      public static float nv0(long struct)
      Unsafe version of v0().
    • nu1

      public static float nu1(long struct)
      Unsafe version of u1().
    • nv1

      public static float nv1(long struct)
      Unsafe version of v1().
    • ncodepoint

      public static void ncodepoint(long struct, int value)
      Unsafe version of codepoint.
    • nxadvance

      public static void nxadvance(long struct, float value)
      Unsafe version of xadvance.
    • nx0

      public static void nx0(long struct, float value)
      Unsafe version of x0.
    • ny0

      public static void ny0(long struct, float value)
      Unsafe version of y0.
    • nx1

      public static void nx1(long struct, float value)
      Unsafe version of x1.
    • ny1

      public static void ny1(long struct, float value)
      Unsafe version of y1.
    • nw

      public static void nw(long struct, float value)
      Unsafe version of w.
    • nh

      public static void nh(long struct, float value)
      Unsafe version of h.
    • nu0

      public static void nu0(long struct, float value)
      Unsafe version of u0.
    • nv0

      public static void nv0(long struct, float value)
      Unsafe version of v0.
    • nu1

      public static void nu1(long struct, float value)
      Unsafe version of u1.
    • nv1

      public static void nv1(long struct, float value)
      Unsafe version of v1.