Record Class STBTT_Vertex

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

@ValueBasedCandidate @UnsafeConstructor public record STBTT_Vertex(@NotNull MemorySegment segment) extends Record implements ISTBTT_Vertex

Represents a pointer to a stbtt_vertex structure in native memory.

Structure

typedef struct stbtt_vertex {
    stbtt_vertex_type x;
    stbtt_vertex_type y;
    stbtt_vertex_type cx;
    stbtt_vertex_type cy;
    stbtt_vertex_type cx1;
    stbtt_vertex_type cy1;
    char type;
    char padding;
} stbtt_vertex;

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

      public static final MemoryLayout.PathElement PATH$x
    • PATH$y

      public static final MemoryLayout.PathElement PATH$y
    • PATH$cx

      public static final MemoryLayout.PathElement PATH$cx
    • PATH$cy

      public static final MemoryLayout.PathElement PATH$cy
    • PATH$cx1

      public static final MemoryLayout.PathElement PATH$cx1
    • PATH$cy1

      public static final MemoryLayout.PathElement PATH$cy1
    • PATH$type

      public static final MemoryLayout.PathElement PATH$type
    • PATH$padding

      public static final MemoryLayout.PathElement PATH$padding
    • LAYOUT$x

      public static final ValueLayout.OfShort LAYOUT$x
    • LAYOUT$y

      public static final ValueLayout.OfShort LAYOUT$y
    • LAYOUT$cx

      public static final ValueLayout.OfShort LAYOUT$cx
    • LAYOUT$cy

      public static final ValueLayout.OfShort LAYOUT$cy
    • LAYOUT$cx1

      public static final ValueLayout.OfShort LAYOUT$cx1
    • LAYOUT$cy1

      public static final ValueLayout.OfShort LAYOUT$cy1
    • LAYOUT$type

      public static final ValueLayout.OfByte LAYOUT$type
    • LAYOUT$padding

      public static final ValueLayout.OfByte LAYOUT$padding
    • SIZE$x

      public static final long SIZE$x
    • SIZE$y

      public static final long SIZE$y
    • SIZE$cx

      public static final long SIZE$cx
    • SIZE$cy

      public static final long SIZE$cy
    • SIZE$cx1

      public static final long SIZE$cx1
    • SIZE$cy1

      public static final long SIZE$cy1
    • SIZE$type

      public static final long SIZE$type
    • SIZE$padding

      public static final long SIZE$padding
    • OFFSET$x

      public static final long OFFSET$x
    • OFFSET$y

      public static final long OFFSET$y
    • OFFSET$cx

      public static final long OFFSET$cx
    • OFFSET$cy

      public static final long OFFSET$cy
    • OFFSET$cx1

      public static final long OFFSET$cx1
    • OFFSET$cy1

      public static final long OFFSET$cy1
    • OFFSET$type

      public static final long OFFSET$type
    • OFFSET$padding

      public static final long OFFSET$padding
  • Constructor Details

    • STBTT_Vertex

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

    • allocate

      public static STBTT_Vertex allocate(Arena arena)
    • allocate

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

      public static STBTT_Vertex clone(Arena arena, STBTT_Vertex src)
    • x

      @NativeType("stbtt_vertex_type") public short x()
    • x

      public STBTT_Vertex x(@NativeType("stbtt_vertex_type") short value)
    • y

      @NativeType("stbtt_vertex_type") public short y()
    • y

      public STBTT_Vertex y(@NativeType("stbtt_vertex_type") short value)
    • cx

      @NativeType("stbtt_vertex_type") public short cx()
    • cx

      public STBTT_Vertex cx(@NativeType("stbtt_vertex_type") short value)
    • cy

      @NativeType("stbtt_vertex_type") public short cy()
    • cy

      public STBTT_Vertex cy(@NativeType("stbtt_vertex_type") short value)
    • cx1

      @NativeType("stbtt_vertex_type") public short cx1()
    • cx1

      public STBTT_Vertex cx1(@NativeType("stbtt_vertex_type") short value)
    • cy1

      @NativeType("stbtt_vertex_type") public short cy1()
    • cy1

      public STBTT_Vertex cy1(@NativeType("stbtt_vertex_type") short value)
    • type

      public byte type()
    • type

      public STBTT_Vertex type(byte value)
    • padding

      public byte padding()
    • padding

      public STBTT_Vertex padding(byte 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