Class FT_Matrix

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class FT_Matrix extends Struct<FT_Matrix> implements NativeResource

 struct FT_Matrix {
     FT_Fixed xx;
     FT_Fixed xy;
     FT_Fixed yx;
     FT_Fixed yy;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int XX
      The struct member offsets.
    • XY

      public static final int XY
      The struct member offsets.
    • YX

      public static final int YX
      The struct member offsets.
    • YY

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

    • FT_Matrix

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

      public long xx()
      Returns:
      the value of the xx field.
    • xy

      public long xy()
      Returns:
      the value of the xy field.
    • yx

      public long yx()
      Returns:
      the value of the yx field.
    • yy

      public long yy()
      Returns:
      the value of the yy field.
    • xx

      public FT_Matrix xx(long value)
      Sets the specified value to the xx field.
    • xy

      public FT_Matrix xy(long value)
      Sets the specified value to the xy field.
    • yx

      public FT_Matrix yx(long value)
      Sets the specified value to the yx field.
    • yy

      public FT_Matrix yy(long value)
      Sets the specified value to the yy field.
    • set

      public FT_Matrix set(long xx, long xy, long yx, long yy)
      Initializes this struct with the specified values.
    • set

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static FT_Matrix.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new FT_Matrix.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
    • nxx

      public static long nxx(long struct)
      Unsafe version of xx().
    • nxy

      public static long nxy(long struct)
      Unsafe version of xy().
    • nyx

      public static long nyx(long struct)
      Unsafe version of yx().
    • nyy

      public static long nyy(long struct)
      Unsafe version of yy().
    • nxx

      public static void nxx(long struct, long value)
      Unsafe version of xx.
    • nxy

      public static void nxy(long struct, long value)
      Unsafe version of xy.
    • nyx

      public static void nyx(long struct, long value)
      Unsafe version of yx.
    • nyy

      public static void nyy(long struct, long value)
      Unsafe version of yy.