Class NVGPaint

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • XFORM, EXTENT, RADIUS, FEATHER, INNERCOLOR, OUTERCOLOR, IMAGE

        The struct member offsets.
    • Constructor Detail

      • NVGPaint

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

        public java.nio.FloatBuffer xform()
        
        public float xform​(int index)
        
        the transformation matrix
      • extent

        public java.nio.FloatBuffer extent()
        
        public float extent​(int index)
        
        the extent
      • radius

        public float radius()
        the radius
      • feather

        public float feather()
        the feather amount
      • innerColor

        public NVGColor innerColor()
        the inner color
      • outerColor

        public NVGColor outerColor()
        the outer color
      • image

        public int image()
        the image handle
      • xform

        public NVGPaint xform​(java.nio.FloatBuffer value)
        Copies the specified FloatBuffer to the xform() field.
      • xform

        public NVGPaint xform​(int index,
                              float value)
        Sets the specified value at the specified index of the xform() field.
      • extent

        public NVGPaint extent​(java.nio.FloatBuffer value)
        Copies the specified FloatBuffer to the extent() field.
      • extent

        public NVGPaint extent​(int index,
                               float value)
        Sets the specified value at the specified index of the extent() field.
      • radius

        public NVGPaint radius​(float value)
        Sets the specified value to the radius() field.
      • feather

        public NVGPaint feather​(float value)
        Sets the specified value to the feather() field.
      • innerColor

        public NVGPaint innerColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the innerColor() field to the specified Consumer.
      • outerColor

        public NVGPaint outerColor​(java.util.function.Consumer<NVGColor> consumer)
        Passes the outerColor() field to the specified Consumer.
      • image

        public NVGPaint image​(int value)
        Sets the specified value to the image() field.
      • set

        public NVGPaint set​(java.nio.FloatBuffer xform,
                            java.nio.FloatBuffer extent,
                            float radius,
                            float feather,
                            NVGColor innerColor,
                            NVGColor outerColor,
                            int image)
        Initializes this struct with the specified values.
      • set

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

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

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

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

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

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

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

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

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

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

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

        @Deprecated
        public static NVGPaint mallocStack()
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static NVGPaint callocStack()
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

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

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

        @Deprecated
        public static NVGPaint.Buffer mallocStack​(int capacity,
                                                  org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
      • callocStack

        @Deprecated
        public static NVGPaint.Buffer callocStack​(int capacity,
                                                  org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
      • malloc

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

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

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

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

        public static java.nio.FloatBuffer nxform​(long struct)
        Unsafe version of xform().
      • nxform

        public static float nxform​(long struct,
                                   int index)
        Unsafe version of xform.
      • nextent

        public static java.nio.FloatBuffer nextent​(long struct)
        Unsafe version of extent().
      • nextent

        public static float nextent​(long struct,
                                    int index)
        Unsafe version of extent.
      • nradius

        public static float nradius​(long struct)
        Unsafe version of radius().
      • nfeather

        public static float nfeather​(long struct)
        Unsafe version of feather().
      • nimage

        public static int nimage​(long struct)
        Unsafe version of image().
      • nxform

        public static void nxform​(long struct,
                                  java.nio.FloatBuffer value)
        Unsafe version of xform.
      • nxform

        public static void nxform​(long struct,
                                  int index,
                                  float value)
        Unsafe version of xform.
      • nextent

        public static void nextent​(long struct,
                                   java.nio.FloatBuffer value)
        Unsafe version of extent.
      • nextent

        public static void nextent​(long struct,
                                   int index,
                                   float value)
        Unsafe version of extent.
      • nradius

        public static void nradius​(long struct,
                                   float value)
        Unsafe version of radius.
      • nfeather

        public static void nfeather​(long struct,
                                    float value)
        Unsafe version of feather.
      • ninnerColor

        public static void ninnerColor​(long struct,
                                       NVGColor value)
        Unsafe version of innerColor.
      • nouterColor

        public static void nouterColor​(long struct,
                                       NVGColor value)
        Unsafe version of outerColor.
      • nimage

        public static void nimage​(long struct,
                                  int value)
        Unsafe version of image.