Record Class STBTT_Bakedchar
java.lang.Object
java.lang.Record
club.doki7.stb.truetype.datatype.STBTT_Bakedchar
- All Implemented Interfaces:
IPointer
,ISTBTT_Bakedchar
@ValueBasedCandidate
@UnsafeConstructor
public record STBTT_Bakedchar(@NotNull MemorySegment segment)
extends Record
implements ISTBTT_Bakedchar
Represents a pointer to a stbtt_bakedchar
structure in native memory.
Structure
typedef struct stbtt_bakedchar {
short x0
;
short y0
;
short x1
;
short y1
;
float xoff
;
float yoff
;
float xadvance
;
} stbtt_bakedchar;
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.OfShort
static final ValueLayout.OfShort
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 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
-
Constructor Summary
ConstructorsConstructorDescriptionSTBTT_Bakedchar
(@NotNull MemorySegment segment) Creates an instance of aSTBTT_Bakedchar
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic STBTT_Bakedchar
static STBTT_Bakedchar.Ptr
static STBTT_Bakedchar
clone
(Arena arena, STBTT_Bakedchar 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) short
y0()
y0
(short value) short
y1()
y1
(short value) float
yoff()
yoff
(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
-
LAYOUT$x0
-
LAYOUT$y0
-
LAYOUT$x1
-
LAYOUT$y1
-
LAYOUT$xoff
-
LAYOUT$yoff
-
LAYOUT$xadvance
-
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 -
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
-
-
Constructor Details
-
STBTT_Bakedchar
Creates an instance of aSTBTT_Bakedchar
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
-
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.
-