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 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.OfFloat
static final ValueLayout.OfFloat
static final ValueLayout.OfFloat
static final ValueLayout.OfShort
static final ValueLayout.OfShort
static final ValueLayout.OfFloat
static final ValueLayout.OfFloat
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 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 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
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSTBTT_Packedchar
(@NotNull MemorySegment segment) Creates an instance of aSTBTT_Packedchar
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTT_Packedchar
static STBTT_Packedchar.Ptr
static STBTT_Packedchar
clone
(Arena arena, STBTT_Packedchar src) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.short
x0()
x0
(short value) short
x1()
x1
(short value) float
xadvance()
xadvance
(float value) float
xoff()
xoff
(float value) float
xoff2()
xoff2
(float value) short
y0()
y0
(short value) short
y1()
y1
(short value) float
yoff()
yoff
(float value) float
yoff2()
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_Packedchar
record class.- Parameters:
segment
- the value for thesegment
record 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 thesegment
record component.
-