Class NSVGShape

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ID, FILL, STROKE, OPACITY, STROKEWIDTH, STROKEDASHOFFSET, STROKEDASHARRAY, STROKEDASHCOUNT, STROKELINEJOIN, STROKELINECAP, MITERLIMIT, FILLRULE, FLAGS, BOUNDS, PATHS, NEXT

        The struct member offsets.
    • Constructor Detail

      • NSVGShape

        public NSVGShape​(java.nio.ByteBuffer container)
        Creates a NSVGShape 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
      • id, idString

        public java.nio.ByteBuffer id()
        
        public java.lang.String idString()
        
        optional 'id' attr of the shape or its group
      • stroke

        public NSVGPaint stroke()
        stroke paint
      • opacity

        public float opacity()
        opacity of the shape
      • strokeWidth

        public float strokeWidth()
        stroke width (scaled)
      • strokeDashOffset

        public float strokeDashOffset()
        stroke dash offset (scaled)
      • strokeDashArray

        public java.nio.FloatBuffer strokeDashArray()
        
        public float strokeDashArray​(int index)
        
        stroke dash array (scaled)
      • strokeDashCount

        public byte strokeDashCount()
        number of dash values in dash array
      • strokeLineJoin

        public byte strokeLineJoin()
        stroke join type
      • strokeLineCap

        public byte strokeLineCap()
        stroke cap type
      • miterLimit

        public float miterLimit()
        miter limit
      • fillRule

        public byte fillRule()
        fill rule, see NSVGfillRule
      • flags

        public byte flags()
        logical or of NSVG_FLAGS_* flags
      • bounds

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

        public NSVGPath paths()
        linked list of paths in the image
      • next

        public NSVGShape next()
        pointer to next shape, or NULL if last element
      • create

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

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

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

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

        public static java.nio.ByteBuffer nid​(long struct)
        Unsafe version of id().
      • nidString

        public static java.lang.String nidString​(long struct)
        Unsafe version of idString().
      • nfill

        public static NSVGPaint nfill​(long struct)
        Unsafe version of fill().
      • nstroke

        public static NSVGPaint nstroke​(long struct)
        Unsafe version of stroke().
      • nopacity

        public static float nopacity​(long struct)
        Unsafe version of opacity().
      • nstrokeWidth

        public static float nstrokeWidth​(long struct)
        Unsafe version of strokeWidth().
      • nstrokeDashOffset

        public static float nstrokeDashOffset​(long struct)
        Unsafe version of strokeDashOffset().
      • nstrokeDashArray

        public static java.nio.FloatBuffer nstrokeDashArray​(long struct)
        Unsafe version of strokeDashArray().
      • nstrokeDashArray

        public static float nstrokeDashArray​(long struct,
                                             int index)
        Unsafe version of strokeDashArray.
      • nstrokeDashCount

        public static byte nstrokeDashCount​(long struct)
        Unsafe version of strokeDashCount().
      • nstrokeLineJoin

        public static byte nstrokeLineJoin​(long struct)
        Unsafe version of strokeLineJoin().
      • nstrokeLineCap

        public static byte nstrokeLineCap​(long struct)
        Unsafe version of strokeLineCap().
      • nmiterLimit

        public static float nmiterLimit​(long struct)
        Unsafe version of miterLimit().
      • nfillRule

        public static byte nfillRule​(long struct)
        Unsafe version of fillRule().
      • nflags

        public static byte nflags​(long struct)
        Unsafe version of flags().
      • 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.
      • npaths

        public static NSVGPath npaths​(long struct)
        Unsafe version of paths().
      • nnext

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