Class NVGPaint.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<NVGPaint>, NativeResource, Pointer
Enclosing class:
NVGPaint

public static class NVGPaint.Buffer extends StructBuffer<NVGPaint,NVGPaint.Buffer> implements NativeResource
An array of NVGPaint structs.
  • Constructor Details

    • Buffer

      public Buffer(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 Details

    • xform

      public 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 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.
    • outerColor

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

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

      public NVGPaint.Buffer xform(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(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.
    • innerColor

      public NVGPaint.Buffer innerColor(NVGColor value)
      Copies the specified NVGColor to the innerColor field.
    • innerColor

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

      public NVGPaint.Buffer outerColor(NVGColor value)
      Copies the specified NVGColor to the outerColor field.
    • outerColor

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

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