Class NSVGGradient

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<NSVGGradient>
org.lwjgl.nanovg.NSVGGradient
All Implemented Interfaces:
org.lwjgl.system.Pointer

public class NSVGGradient extends org.lwjgl.system.Struct<NSVGGradient>

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 
    An array of NSVGGradient structs.

    Nested classes/interfaces inherited from class org.lwjgl.system.Struct

    org.lwjgl.system.Struct.StructValidation

    Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The struct alignment in bytes.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct member offsets.
    static final int
    The struct size in bytes.
    static final int
    The struct member offsets.
    static final int
    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
    Creates a NSVGGradient instance at the current position of the specified ByteBuffer container.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(long address)
    Returns a new NSVGGradient instance for the specified memory address.
    create(long address, int capacity)
    Create a NSVGGradient.Buffer instance at the specified memory.
    createSafe(long address)
    Like create, but returns null if address is NULL.
    createSafe(long address, int capacity)
    Like create, but returns null if address is NULL.
    float
    fx()
     
    float
    fy()
     
    static float
    nfx(long struct)
    Unsafe version of fx().
    static float
    nfy(long struct)
    Unsafe version of fy().
    static int
    nnstops(long struct)
    Unsafe version of nstops().
    npstops(long struct)
    Unsafe version of pstops().
    npstops(long struct, int index)
    Unsafe version of pstops.
    static byte
    nspread(long struct)
    Unsafe version of spread().
    int
     
    nxform(long struct)
    Unsafe version of xform().
    static float
    nxform(long struct, int index)
    Unsafe version of xform.
     
    pstops(int index)
     
    int
     
    byte
     
     
    float
    xform(int index)
     

    Methods inherited from class org.lwjgl.system.Struct

    clear, free, isNull, validate

    Methods inherited from class org.lwjgl.system.Pointer.Default

    address, equals, hashCode, toString

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • SIZEOF

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

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

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

      public static final int SPREAD
      The struct member offsets.
    • FX

      public static final int FX
      The struct member offsets.
    • FY

      public static final int FY
      The struct member offsets.
    • NSTOPS

      public static final int NSTOPS
      The struct member offsets.
    • PSTOPS

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

    • NSVGGradient

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

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<NSVGGradient>
    • 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.
    • 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.
    • pstops

      public NSVGGradientStop.Buffer pstops()
      Returns:
      a NSVGGradientStop.Buffer view of the pstops field.
    • pstops

      public NSVGGradientStop pstops(int index)
      Returns:
      a NSVGGradientStop view of the struct at the specified index of the pstops 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 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().
    • npstops

      public static NSVGGradientStop.Buffer npstops(long struct)
      Unsafe version of pstops().
    • npstops

      public static NSVGGradientStop npstops(long struct, int index)
      Unsafe version of pstops.