Class NSVGImage

All Implemented Interfaces:
Pointer

public class NSVGImage extends Struct<NSVGImage>

 struct NSVGimage {
     float width;
     float height;
     {@link NSVGShape NSVGshape} * shapes;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • WIDTH

      public static final int WIDTH
      The struct member offsets.
    • HEIGHT

      public static final int HEIGHT
      The struct member offsets.
    • SHAPES

      public static final int SHAPES
      The struct member offsets.
  • Constructor Details

    • NSVGImage

      public NSVGImage(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<NSVGImage>
    • 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 @Nullable 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.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable 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().