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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfBytestatic final ValueLayout.OfBytestatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSTBTT_Vertex(@NotNull MemorySegment segment) Creates an instance of aSTBTT_Vertexrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTT_Vertexstatic STBTT_Vertex.Ptrstatic STBTT_Vertexclone(Arena arena, STBTT_Vertex src) shortcx()cx(short value) shortcx1()cx1(short value) shortcy()cy(short value) shortcy1()cy1(short value) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.bytepadding()padding(byte value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.bytetype()type(byte value) shortx()x(short value) shorty()y(short value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$x
-
PATH$y
-
PATH$cx
-
PATH$cy
-
PATH$cx1
-
PATH$cy1
-
PATH$type
-
PATH$padding
-
LAYOUT$x
-
LAYOUT$y
-
LAYOUT$cx
-
LAYOUT$cy
-
LAYOUT$cx1
-
LAYOUT$cy1
-
LAYOUT$type
-
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
Creates an instance of aSTBTT_Vertexrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
x
-
x
-
y
-
y
-
cx
-
cx
-
cy
-
cy
-
cx1
-
cx1
-
cy1
-
cy1
-
type
public byte type() -
type
-
padding
public byte padding() -
padding
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-