Class NSVGPath

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

    public class NSVGPath
    extends org.lwjgl.system.Struct

    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
      • Nested classes/interfaces inherited from class org.lwjgl.system.Struct

        org.lwjgl.system.Struct.StructValidation
    • 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()
      tight bounding box of the shape [minx,miny,maxx,maxy]
      float bounds​(int index)
      tight bounding box of the shape [minx,miny,maxx,maxy]
      byte closed()
      flag indicating if shapes should be treated as closed
      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()
      pointer to next path, or NULL if last element
      static NSVGPath nnext​(long struct)
      Unsafe version of next().
      static int nnpts​(long struct)
      Unsafe version of npts().
      int npts()
      total number of bezier points
      static java.nio.FloatBuffer npts​(long struct)
      Unsafe version of pts.
      java.nio.FloatBuffer pts()
      cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...
      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, validate
    • 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()
        cubic bezier points: x0,y0, [cpx1,cpx1,cpx2,cpy2,x1,y1], ...
      • npts

        public int npts()
        total number of bezier points
      • closed

        public byte closed()
        flag indicating if shapes should be treated as closed
      • bounds

        public java.nio.FloatBuffer bounds()
        
        public float bounds​(int index)
        
        tight bounding box of the shape [minx,miny,maxx,maxy]
      • next

        public NSVGPath next()
        pointer to next path, or NULL if last element
      • 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().