Class NSVGGradient

  • All Implemented Interfaces:

    public class NSVGGradient
    extends Struct


     struct NSVGgradient {
         float xform[6];
         char spread;
         float fx;
         float fy;
         int nstops;
         NSVGgradientStop pstops[1];
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • NSVGGradient

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

        public byte spread()
        Returns the value of the spread field.
      • fx

        public float fx()
        Returns the value of the fx field.
      • fy

        public float fy()
        Returns the value of the fy field.
      • nstops

        public int nstops()
        Returns the value of the nstops field.
      • create

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

        public static NSVGGradient createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

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

        public static NSVGGradient.Buffer createSafe​(long address,
                                                     int capacity)
        Like create, but returns null if address is NULL.
      • 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.
      • nspread

        public static byte nspread​(long struct)
        Unsafe version of spread().
      • nfx

        public static float nfx​(long struct)
        Unsafe version of fx().
      • nfy

        public static float nfy​(long struct)
        Unsafe version of fy().
      • nnstops

        public static int nnstops​(long struct)
        Unsafe version of nstops().