Class NSVGPaint

All Implemented Interfaces:
Pointer

public class NSVGPaint extends Struct<NSVGPaint>

 struct NSVGpaint {
     signed char type;
     union {
         unsigned int color;
         {@link NSVGGradient NSVGgradient} * gradient;
     };
 }
  • Field Details

    • SIZEOF

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

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

      public static final int TYPE
      The struct member offsets.
    • COLOR

      public static final int COLOR
      The struct member offsets.
    • GRADIENT

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

    • NSVGPaint

      public NSVGPaint(ByteBuffer container)
      Creates a NSVGPaint 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<NSVGPaint>
    • type

      public byte type()
      Returns:
      the value of the type field.
    • color

      public int color()
      Returns:
      the value of the color field.
    • gradient

      public NSVGGradient gradient()
      Returns:
      a NSVGGradient view of the struct pointed to by the gradient field.
    • create

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

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

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

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

      public static byte ntype(long struct)
      Unsafe version of type().
    • ncolor

      public static int ncolor(long struct)
      Unsafe version of color().
    • ngradient

      public static NSVGGradient ngradient(long struct)
      Unsafe version of gradient().