Record Class STBTT_Packedchar
java.lang.Object
java.lang.Record
club.doki7.stb.truetype.datatype.STBTT_Packedchar
- All Implemented Interfaces:
IPointer,ISTBTT_Packedchar
@ValueBasedCandidate
@UnsafeConstructor
public record STBTT_Packedchar(@NotNull MemorySegment segment)
extends Record
implements ISTBTT_Packedchar
Represents a pointer to a stbtt_packedchar structure in native memory.
Structure
typedef struct stbtt_packedchar {
short x0;
short y0;
short x1;
short y1;
float xoff;
float yoff;
float xadvance;
float xoff2;
float yoff2;
} stbtt_packedchar;
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.OfFloatstatic final ValueLayout.OfFloatstatic final ValueLayout.OfFloatstatic final ValueLayout.OfShortstatic final ValueLayout.OfShortstatic final ValueLayout.OfFloatstatic final ValueLayout.OfFloatstatic final longstatic 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 MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSTBTT_Packedchar(@NotNull MemorySegment segment) Creates an instance of aSTBTT_Packedcharrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTT_Packedcharstatic STBTT_Packedchar.Ptrstatic STBTT_Packedcharclone(Arena arena, STBTT_Packedchar src) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.shortx0()x0(short value) shortx1()x1(short value) floatxadvance()xadvance(float value) floatxoff()xoff(float value) floatxoff2()xoff2(float value) shorty0()y0(short value) shorty1()y1(short value) floatyoff()yoff(float value) floatyoff2()yoff2(float value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$x0
-
PATH$y0
-
PATH$x1
-
PATH$y1
-
PATH$xoff
-
PATH$yoff
-
PATH$xadvance
-
PATH$xoff2
-
PATH$yoff2
-
LAYOUT$x0
-
LAYOUT$y0
-
LAYOUT$x1
-
LAYOUT$y1
-
LAYOUT$xoff
-
LAYOUT$yoff
-
LAYOUT$xadvance
-
LAYOUT$xoff2
-
LAYOUT$yoff2
-
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 -
SIZE$xoff2
public static final long SIZE$xoff2 -
SIZE$yoff2
public static final long SIZE$yoff2 -
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 -
OFFSET$xoff2
public static final long OFFSET$xoff2 -
OFFSET$yoff2
public static final long OFFSET$yoff2
-
-
Constructor Details
-
STBTT_Packedchar
Creates an instance of aSTBTT_Packedcharrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
x0
public short x0() -
x0
-
y0
public short y0() -
y0
-
x1
public short x1() -
x1
-
y1
public short y1() -
y1
-
xoff
public float xoff() -
xoff
-
yoff
public float yoff() -
yoff
-
xadvance
public float xadvance() -
xadvance
-
xoff2
public float xoff2() -
xoff2
-
yoff2
public float yoff2() -
yoff2
-
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.
-