Class NSVGGradient

  • All Implemented Interfaces:
    org.lwjgl.system.Pointer

    public class NSVGGradient
    extends org.lwjgl.system.Struct

    Layout

    
     struct NSVGgradient {
         float xform[6];
         char spread;
         float fx;
         float fy;
         int nstops;
         NSVGgradientStop pstops[1];
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  NSVGGradient.Buffer
      An array of NSVGGradient structs.
      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ALIGNOF
      The struct alignment in bytes.
      static int FX
      FY
      NSTOPS
      PSTOPS
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      static int SPREAD
      XFORM
      The struct member offsets.
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Constructor Summary

      Constructors 
      Constructor Description
      NSVGGradient​(java.nio.ByteBuffer container)
      Creates a NSVGGradient instance at the current position of the specified ByteBuffer container.
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • XFORM, SPREAD, FX, FY, NSTOPS, PSTOPS

        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()
        Specified by:
        sizeof in class org.lwjgl.system.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

        @Nullable
        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.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        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().