Class NSVGPath

  • All Implemented Interfaces:

    public class NSVGPath
    extends 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


     struct NSVGpath {
         float * pts;
         int npts;
         char closed;
         float bounds[4];
         NSVGpath * next;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        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()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class 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

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

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