Class NVGPaint.Buffer

    • Constructor Detail

      • Buffer

        public Buffer​(java.nio.ByteBuffer container)
        Creates a new NVGPaint.Buffer instance backed by the specified container. Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by NVGPaint.SIZEOF, and its mark will be undefined.

        The created buffer instance holds a strong reference to the container object.

      • Buffer

        public Buffer​(long address,
                      int cap)
    • Method Detail

      • xform

        public java.nio.FloatBuffer xform()
        Returns a FloatBuffer view of the xform field.
      • xform

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

        public java.nio.FloatBuffer extent()
        Returns a FloatBuffer view of the extent field.
      • extent

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

        public float radius()
        Returns the value of the radius field.
      • feather

        public float feather()
        Returns the value of the feather field.
      • innerColor

        public NVGColor innerColor()
        Returns a NVGColor view of the innerColor field.
      • innerColor

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

        public NVGColor outerColor()
        Returns a NVGColor view of the outerColor field.
      • outerColor

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

        public int image()
        Returns the value of the image field.
      • xform

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

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

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

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

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

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

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