Record Class STBTT_Bakedchar

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

@ValueBasedCandidate @UnsafeConstructor public record STBTT_Bakedchar(@NotNull MemorySegment segment) extends Record implements ISTBTT_Bakedchar

Represents a pointer to a stbtt_bakedchar structure in native memory.

Structure

typedef struct stbtt_bakedchar {
    short x0;
    short y0;
    short x1;
    short y1;
    float xoff;
    float yoff;
    float xadvance;
} stbtt_bakedchar;

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$x1

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

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

      public static final MemoryLayout.PathElement PATH$xoff
    • PATH$yoff

      public static final MemoryLayout.PathElement PATH$yoff
    • PATH$xadvance

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

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

      public static final ValueLayout.OfShort LAYOUT$y0
    • LAYOUT$x1

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

      public static final ValueLayout.OfShort LAYOUT$y1
    • LAYOUT$xoff

      public static final ValueLayout.OfFloat LAYOUT$xoff
    • LAYOUT$yoff

      public static final ValueLayout.OfFloat LAYOUT$yoff
    • LAYOUT$xadvance

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

      public static final long SIZE$x0
    • SIZE$y0

      public static final long SIZE$y0
    • SIZE$x1

      public static final long SIZE$x1
    • SIZE$y1

      public static final long SIZE$y1
    • SIZE$xoff

      public static final long SIZE$xoff
    • SIZE$yoff

      public static final long SIZE$yoff
    • SIZE$xadvance

      public static final long SIZE$xadvance
    • OFFSET$x0

      public static final long OFFSET$x0
    • OFFSET$y0

      public static final long OFFSET$y0
    • OFFSET$x1

      public static final long OFFSET$x1
    • OFFSET$y1

      public static final long OFFSET$y1
    • OFFSET$xoff

      public static final long OFFSET$xoff
    • OFFSET$yoff

      public static final long OFFSET$yoff
    • OFFSET$xadvance

      public static final long OFFSET$xadvance
  • Constructor Details

    • STBTT_Bakedchar

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

    • allocate

      public static STBTT_Bakedchar allocate(Arena arena)
    • allocate

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

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

      public short x0()
    • x0

      public STBTT_Bakedchar x0(short value)
    • y0

      public short y0()
    • y0

      public STBTT_Bakedchar y0(short value)
    • x1

      public short x1()
    • x1

      public STBTT_Bakedchar x1(short value)
    • y1

      public short y1()
    • y1

      public STBTT_Bakedchar y1(short value)
    • xoff

      public float xoff()
    • xoff

      public STBTT_Bakedchar xoff(float value)
    • yoff

      public float yoff()
    • yoff

      public STBTT_Bakedchar yoff(float value)
    • xadvance

      public float xadvance()
    • xadvance

      public STBTT_Bakedchar xadvance(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