Class NVGGlyphPosition

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

    public class NVGGlyphPosition
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    A glyph position.

    Layout

    
     struct NVGglyphPosition {
         char * str();
         float x();
         float minx();
         float maxx();
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STR, X, MINX, MAXX

        The struct member offsets.
    • Constructor Detail

      • NVGGlyphPosition

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

        public long str()
        position of the glyph in the input string
      • x

        public float x()
        the x-coordinate of the logical glyph position
      • minx

        public float minx()
        the left bound of the glyph shape
      • maxx

        public float maxx()
        the right bound of the glyph shape
      • malloc

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

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

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

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

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

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

        @Deprecated
        public static NVGGlyphPosition mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static NVGGlyphPosition callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • malloc

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

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

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

        public static NVGGlyphPosition.Buffer calloc​(int capacity,
                                                     org.lwjgl.system.MemoryStack stack)
        Returns a new NVGGlyphPosition.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
      • nstr

        public static long nstr​(long struct)
        Unsafe version of str().
      • nx

        public static float nx​(long struct)
        Unsafe version of x().
      • nminx

        public static float nminx​(long struct)
        Unsafe version of minx().
      • nmaxx

        public static float nmaxx​(long struct)
        Unsafe version of maxx().