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_ty
pe 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 record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfByte
static final ValueLayout.OfByte
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSTBTT_Vertex
(@NotNull MemorySegment segment) Creates an instance of aSTBTT_Vertex
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTT_Vertex
static STBTT_Vertex.Ptr
static STBTT_Vertex
clone
(Arena arena, STBTT_Vertex src) short
cx()
cx
(short value) short
cx1()
cx1
(short value) short
cy()
cy
(short value) short
cy1()
cy1
(short value) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.byte
padding()
padding
(byte value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.byte
type()
type
(byte value) short
x()
x
(short value) short
y()
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_Vertex
record class.- Parameters:
segment
- the value for thesegment
record 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 thesegment
record component.
-