Class NSVGImage

  • All Implemented Interfaces:

    public class NSVGImage
    extends Struct

    Member documentation

    • width – Width of the image.
    • height – Height of the image.
    • shapes – lLinked list of shapes in the image


     struct NSVGimage {
         float width;
         float height;
         NSVGshape * shapes;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • NSVGImage

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

        public float width()
        Returns the value of the width field.
      • height

        public float height()
        Returns the value of the height field.
      • shapes

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

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

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

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

        public static NSVGImage.Buffer createSafe​(long address,
                                                  int capacity)
        Like create, but returns null if address is NULL.
      • nwidth

        public static float nwidth​(long struct)
        Unsafe version of width().
      • nheight

        public static float nheight​(long struct)
        Unsafe version of height().
      • nshapes

        public static NSVGShape nshapes​(long struct)
        Unsafe version of shapes().