Record Class STBTT_AlignedQuad

java.lang.Object
java.lang.Record
club.doki7.stb.truetype.datatype.STBTT_AlignedQuad
All Implemented Interfaces:
IPointer, ISTBTT_AlignedQuad

@ValueBasedCandidate @UnsafeConstructor public record STBTT_AlignedQuad(@NotNull MemorySegment segment) extends Record implements ISTBTT_AlignedQuad

Represents a pointer to a stbtt_aligned_quad structure in native memory.

Structure

typedef struct stbtt_aligned_quad {
    float x0;
    float y0;
    float s0;
    float t0;
    float x1;
    float y1;
    float s1;
    float t1;
} stbtt_aligned_quad;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.

  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$x0

      public static final MemoryLayout.PathElement PATH$x0
    • PATH$y0

      public static final MemoryLayout.PathElement PATH$y0
    • PATH$s0

      public static final MemoryLayout.PathElement PATH$s0
    • PATH$t0

      public static final MemoryLayout.PathElement PATH$t0
    • PATH$x1

      public static final MemoryLayout.PathElement PATH$x1
    • PATH$y1

      public static final MemoryLayout.PathElement PATH$y1
    • PATH$s1

      public static final MemoryLayout.PathElement PATH$s1
    • PATH$t1

      public static final MemoryLayout.PathElement PATH$t1
    • LAYOUT$x0

      public static final ValueLayout.OfFloat LAYOUT$x0
    • LAYOUT$y0

      public static final ValueLayout.OfFloat LAYOUT$y0
    • LAYOUT$s0

      public static final ValueLayout.OfFloat LAYOUT$s0
    • LAYOUT$t0

      public static final ValueLayout.OfFloat LAYOUT$t0
    • LAYOUT$x1

      public static final ValueLayout.OfFloat LAYOUT$x1
    • LAYOUT$y1

      public static final ValueLayout.OfFloat LAYOUT$y1
    • LAYOUT$s1

      public static final ValueLayout.OfFloat LAYOUT$s1
    • LAYOUT$t1

      public static final ValueLayout.OfFloat LAYOUT$t1
    • SIZE$x0

      public static final long SIZE$x0
    • SIZE$y0

      public static final long SIZE$y0
    • SIZE$s0

      public static final long SIZE$s0
    • SIZE$t0

      public static final long SIZE$t0
    • SIZE$x1

      public static final long SIZE$x1
    • SIZE$y1

      public static final long SIZE$y1
    • SIZE$s1

      public static final long SIZE$s1
    • SIZE$t1

      public static final long SIZE$t1
    • OFFSET$x0

      public static final long OFFSET$x0
    • OFFSET$y0

      public static final long OFFSET$y0
    • OFFSET$s0

      public static final long OFFSET$s0
    • OFFSET$t0

      public static final long OFFSET$t0
    • OFFSET$x1

      public static final long OFFSET$x1
    • OFFSET$y1

      public static final long OFFSET$y1
    • OFFSET$s1

      public static final long OFFSET$s1
    • OFFSET$t1

      public static final long OFFSET$t1
  • Constructor Details

    • STBTT_AlignedQuad

      public STBTT_AlignedQuad(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a STBTT_AlignedQuad record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details

    • allocate

      public static STBTT_AlignedQuad allocate(Arena arena)
    • allocate

      public static STBTT_AlignedQuad.Ptr allocate(Arena arena, long count)
    • clone

      public static STBTT_AlignedQuad clone(Arena arena, STBTT_AlignedQuad src)
    • x0

      public float x0()
    • x0

      public STBTT_AlignedQuad x0(float value)
    • y0

      public float y0()
    • y0

      public STBTT_AlignedQuad y0(float value)
    • s0

      public float s0()
    • s0

      public STBTT_AlignedQuad s0(float value)
    • t0

      public float t0()
    • t0

      public STBTT_AlignedQuad t0(float value)
    • x1

      public float x1()
    • x1

      public STBTT_AlignedQuad x1(float value)
    • y1

      public float y1()
    • y1

      public STBTT_AlignedQuad y1(float value)
    • s1

      public float s1()
    • s1

      public STBTT_AlignedQuad s1(float value)
    • t1

      public float t1()
    • t1

      public STBTT_AlignedQuad t1(float value)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • segment

      @NotNull public @NotNull MemorySegment segment()
      Returns the value of the segment record component.
      Specified by:
      segment in interface IPointer
      Returns:
      the value of the segment record component