Class NSVGShape

All Implemented Interfaces:
Pointer

public class NSVGShape extends Struct<NSVGShape>

 struct NSVGshape {
     char id[64];
     {@link NSVGPaint NSVGpaint} fill;
     {@link NSVGPaint NSVGpaint} stroke;
     float opacity;
     float strokeWidth;
     float strokeDashOffset;
     float strokeDashArray[8];
     char strokeDashCount;
     char strokeLineJoin;
     char strokeLineCap;
     float miterLimit;
     char fillRule;
     unsigned char flags;
     float bounds[4];
     char fillGradient[64];
     char strokeGradient[64];
     float xform[6];
     {@link NSVGPath NSVGpath} * paths;
     {@link NSVGShape NSVGshape} * next;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int ID
      The struct member offsets.
    • FILL

      public static final int FILL
      The struct member offsets.
    • STROKE

      public static final int STROKE
      The struct member offsets.
    • OPACITY

      public static final int OPACITY
      The struct member offsets.
    • STROKEWIDTH

      public static final int STROKEWIDTH
      The struct member offsets.
    • STROKEDASHOFFSET

      public static final int STROKEDASHOFFSET
      The struct member offsets.
    • STROKEDASHARRAY

      public static final int STROKEDASHARRAY
      The struct member offsets.
    • STROKEDASHCOUNT

      public static final int STROKEDASHCOUNT
      The struct member offsets.
    • STROKELINEJOIN

      public static final int STROKELINEJOIN
      The struct member offsets.
    • STROKELINECAP

      public static final int STROKELINECAP
      The struct member offsets.
    • MITERLIMIT

      public static final int MITERLIMIT
      The struct member offsets.
    • FILLRULE

      public static final int FILLRULE
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • BOUNDS

      public static final int BOUNDS
      The struct member offsets.
    • FILLGRADIENT

      public static final int FILLGRADIENT
      The struct member offsets.
    • STROKEGRADIENT

      public static final int STROKEGRADIENT
      The struct member offsets.
    • XFORM

      public static final int XFORM
      The struct member offsets.
    • PATHS

      public static final int PATHS
      The struct member offsets.
    • NEXT

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

    • NSVGShape

      public NSVGShape(ByteBuffer container)
      Creates a NSVGShape 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<NSVGShape>
    • id

      public ByteBuffer id()
      Returns:
      a ByteBuffer view of the id field.
    • idString

      public String idString()
      Returns:
      the null-terminated string stored in the id field.
    • fill

      public NSVGPaint fill()
      Returns:
      a NSVGPaint view of the fill field.
    • stroke

      public NSVGPaint stroke()
      Returns:
      a NSVGPaint view of the stroke field.
    • opacity

      public float opacity()
      Returns:
      the value of the opacity field.
    • strokeWidth

      public float strokeWidth()
      Returns:
      the value of the strokeWidth field.
    • strokeDashOffset

      public float strokeDashOffset()
      Returns:
      the value of the strokeDashOffset field.
    • strokeDashArray

      public FloatBuffer strokeDashArray()
      Returns:
      a FloatBuffer view of the strokeDashArray field.
    • strokeDashArray

      public float strokeDashArray(int index)
      Returns:
      the value at the specified index of the strokeDashArray field.
    • strokeDashCount

      public byte strokeDashCount()
      Returns:
      the value of the strokeDashCount field.
    • strokeLineJoin

      public byte strokeLineJoin()
      Returns:
      the value of the strokeLineJoin field.
    • strokeLineCap

      public byte strokeLineCap()
      Returns:
      the value of the strokeLineCap field.
    • miterLimit

      public float miterLimit()
      Returns:
      the value of the miterLimit field.
    • fillRule

      public byte fillRule()
      Returns:
      the value of the fillRule field.
    • flags

      public byte flags()
      Returns:
      the value of the flags field.
    • bounds

      public FloatBuffer bounds()
      Returns:
      a FloatBuffer view of the bounds field.
    • bounds

      public float bounds(int index)
      Returns:
      the value at the specified index of the bounds field.
    • fillGradient

      public ByteBuffer fillGradient()
      Returns:
      a ByteBuffer view of the fillGradient field.
    • fillGradientString

      public String fillGradientString()
      Returns:
      the null-terminated string stored in the fillGradient field.
    • strokeGradient

      public ByteBuffer strokeGradient()
      Returns:
      a ByteBuffer view of the strokeGradient field.
    • strokeGradientString

      public String strokeGradientString()
      Returns:
      the null-terminated string stored in the strokeGradient field.
    • 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.
    • paths

      public NSVGPath paths()
      Returns:
      a NSVGPath view of the struct pointed to by the paths field.
    • next

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

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

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

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

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

      public static ByteBuffer nid(long struct)
      Unsafe version of id().
    • nidString

      public static String nidString(long struct)
      Unsafe version of idString().
    • nfill

      public static NSVGPaint nfill(long struct)
      Unsafe version of fill().
    • nstroke

      public static NSVGPaint nstroke(long struct)
      Unsafe version of stroke().
    • nopacity

      public static float nopacity(long struct)
      Unsafe version of opacity().
    • nstrokeWidth

      public static float nstrokeWidth(long struct)
      Unsafe version of strokeWidth().
    • nstrokeDashOffset

      public static float nstrokeDashOffset(long struct)
      Unsafe version of strokeDashOffset().
    • nstrokeDashArray

      public static FloatBuffer nstrokeDashArray(long struct)
      Unsafe version of strokeDashArray().
    • nstrokeDashArray

      public static float nstrokeDashArray(long struct, int index)
      Unsafe version of strokeDashArray.
    • nstrokeDashCount

      public static byte nstrokeDashCount(long struct)
      Unsafe version of strokeDashCount().
    • nstrokeLineJoin

      public static byte nstrokeLineJoin(long struct)
      Unsafe version of strokeLineJoin().
    • nstrokeLineCap

      public static byte nstrokeLineCap(long struct)
      Unsafe version of strokeLineCap().
    • nmiterLimit

      public static float nmiterLimit(long struct)
      Unsafe version of miterLimit().
    • nfillRule

      public static byte nfillRule(long struct)
      Unsafe version of fillRule().
    • nflags

      public static byte nflags(long struct)
      Unsafe version of flags().
    • nbounds

      public static FloatBuffer nbounds(long struct)
      Unsafe version of bounds().
    • nbounds

      public static float nbounds(long struct, int index)
      Unsafe version of bounds.
    • nfillGradient

      public static ByteBuffer nfillGradient(long struct)
      Unsafe version of fillGradient().
    • nfillGradientString

      public static String nfillGradientString(long struct)
      Unsafe version of fillGradientString().
    • nstrokeGradient

      public static ByteBuffer nstrokeGradient(long struct)
      Unsafe version of strokeGradient().
    • nstrokeGradientString

      public static String nstrokeGradientString(long struct)
      Unsafe version of strokeGradientString().
    • nxform

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

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

      public static NSVGPath npaths(long struct)
      Unsafe version of paths().
    • nnext

      public static NSVGShape nnext(long struct)
      Unsafe version of next().