Class NSVGPath

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

    public class NSVGPath
    extends org.lwjgl.system.Struct

    Member documentation

    • pts – cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...
    • npts – total number of bezier points
    • closed – flag indicating if shapes should be treated as closed
    • bounds[4] – tight bounding box of the shape [minx,miny,maxx,maxy]
    • next – pointer to next path, or NULL if last element

    Layout

    
     struct NSVGpath {
         float * pts;
         int npts;
         char closed;
         float bounds[4];
         NSVGpath * next;
     }
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  NSVGPath.Buffer
      An array of NSVGPath 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 BOUNDS
      CLOSED
      NEXT
      NPTS
      PTS
      The struct member offsets.
      static int SIZEOF
      The struct size in bytes.
      • Fields inherited from interface org.lwjgl.system.Pointer

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

      Constructors 
      Constructor Description
      NSVGPath​(java.nio.ByteBuffer container)
      Creates a NSVGPath instance at the current position of the specified ByteBuffer container.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.nio.FloatBuffer bounds()
      Returns a FloatBuffer view of the bounds field.
      float bounds​(int index)
      Returns the value at the specified index of the bounds field.
      byte closed()
      Returns the value of the closed field.
      static NSVGPath create​(long address)
      Returns a new NSVGPath instance for the specified memory address.
      static NSVGPath.Buffer create​(long address, int capacity)
      Create a NSVGPath.Buffer instance at the specified memory.
      static NSVGPath createSafe​(long address)
      Like create, but returns null if address is NULL.
      static NSVGPath.Buffer createSafe​(long address, int capacity)
      Like create, but returns null if address is NULL.
      static java.nio.FloatBuffer nbounds​(long struct)
      Unsafe version of bounds().
      static float nbounds​(long struct, int index)
      Unsafe version of bounds.
      static byte nclosed​(long struct)
      Unsafe version of closed().
      NSVGPath next()
      Returns a NSVGPath view of the struct pointed to by the next field.
      static NSVGPath nnext​(long struct)
      Unsafe version of next().
      static int nnpts​(long struct)
      Unsafe version of npts().
      int npts()
      Returns the value of the npts field.
      static java.nio.FloatBuffer npts​(long struct)
      Unsafe version of pts.
      java.nio.FloatBuffer pts()
      Returns a FloatBuffer view of the data pointed to by the pts field.
      int sizeof()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from class org.lwjgl.system.Pointer.Default

        address, equals, hashCode, toString
      • Methods inherited from class org.lwjgl.system.Struct

        clear, free, isNull
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • PTS, NPTS, CLOSED, BOUNDS, NEXT

        The struct member offsets.
    • Constructor Detail

      • NSVGPath

        public NSVGPath​(java.nio.ByteBuffer container)
        Creates a NSVGPath 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
      • pts

        public java.nio.FloatBuffer pts()
        Returns a FloatBuffer view of the data pointed to by the pts field.
      • npts

        public int npts()
        Returns the value of the npts field.
      • closed

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

        public java.nio.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.
      • next

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

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

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

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

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

        public static java.nio.FloatBuffer npts​(long struct)
        Unsafe version of pts.
      • nnpts

        public static int nnpts​(long struct)
        Unsafe version of npts().
      • nclosed

        public static byte nclosed​(long struct)
        Unsafe version of closed().
      • nbounds

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

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

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