Class MSDFGenBounds

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class MSDFGenBounds extends Struct<MSDFGenBounds> implements NativeResource

 struct msdf_bounds {
     double l;
     double b;
     double r;
     double t;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int L
      The struct member offsets.
    • B

      public static final int B
      The struct member offsets.
    • R

      public static final int R
      The struct member offsets.
    • T

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

    • MSDFGenBounds

      public MSDFGenBounds(ByteBuffer container)
      Creates a MSDFGenBounds 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<MSDFGenBounds>
    • l

      public double l()
      Returns:
      the value of the l field.
    • b

      public double b()
      Returns:
      the value of the b field.
    • r

      public double r()
      Returns:
      the value of the r field.
    • t

      public double t()
      Returns:
      the value of the t field.
    • l

      public MSDFGenBounds l(double value)
      Sets the specified value to the l field.
    • b

      public MSDFGenBounds b(double value)
      Sets the specified value to the b field.
    • r

      public MSDFGenBounds r(double value)
      Sets the specified value to the r field.
    • t

      public MSDFGenBounds t(double value)
      Sets the specified value to the t field.
    • set

      public MSDFGenBounds set(double l, double b, double r, double t)
      Initializes this struct with the specified values.
    • set

      public MSDFGenBounds set(MSDFGenBounds src)
      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static MSDFGenBounds malloc()
      Returns a new MSDFGenBounds instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static MSDFGenBounds calloc()
      Returns a new MSDFGenBounds instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static MSDFGenBounds create()
      Returns a new MSDFGenBounds instance allocated with BufferUtils.
    • create

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

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

      public static MSDFGenBounds.Buffer malloc(int capacity)
      Returns a new MSDFGenBounds.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static MSDFGenBounds.Buffer calloc(int capacity)
      Returns a new MSDFGenBounds.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static MSDFGenBounds.Buffer create(int capacity)
      Returns a new MSDFGenBounds.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

      public static MSDFGenBounds malloc(MemoryStack stack)
      Returns a new MSDFGenBounds instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static MSDFGenBounds calloc(MemoryStack stack)
      Returns a new MSDFGenBounds instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static MSDFGenBounds.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new MSDFGenBounds.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static MSDFGenBounds.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new MSDFGenBounds.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nl

      public static double nl(long struct)
      Unsafe version of l().
    • nb

      public static double nb(long struct)
      Unsafe version of b().
    • nr

      public static double nr(long struct)
      Unsafe version of r().
    • nt

      public static double nt(long struct)
      Unsafe version of t().
    • nl

      public static void nl(long struct, double value)
      Unsafe version of l.
    • nb

      public static void nb(long struct, double value)
      Unsafe version of b.
    • nr

      public static void nr(long struct, double value)
      Unsafe version of r.
    • nt

      public static void nt(long struct, double value)
      Unsafe version of t.