Record Class PFCanvasRef
java.lang.Object
java.lang.Record
dev.pfaff.altargui.pathfinder.PFCanvasRef
-
Constructor Summary
ConstructorsConstructorDescriptionPFCanvasRef
(MemorySegment ptr) Creates an instance of aPFCanvasRef
record class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
final boolean
Indicates whether some other object is "equal to" this one.void
fillRect
(float x1, float y1, float x2, float y2) void
final int
hashCode()
Returns a hash code value for this object.float
measureText
(String text) ptr()
Returns the value of theptr
record component.void
setFillStyle
(PFFillStyleRef style) void
void
setFontSize
(float size) void
setSize
(float width, float height) void
setStrokeStyle
(PFFillStyleRef style) void
strokeText
(String text, float x, float y) final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PFCanvasRef
Creates an instance of aPFCanvasRef
record class.- Parameters:
ptr
- the value for theptr
record component
-
-
Method Details
-
takeScene
-
setSize
public void setSize(float width, float height) -
setFont
- Parameters:
font
- the font to set. It is borrowed during the call, but is left usable afterwards.
-
setFontSize
public void setFontSize(float size) -
fillText
-
strokeText
-
measureText
- Returns:
- the width of the text
-
fillRect
public void fillRect(float x1, float y1, float x2, float y2) -
setFillStyle
-
setStrokeStyle
-
clear
public void clear() -
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)
. -
ptr
Returns the value of theptr
record component.- Returns:
- the value of the
ptr
record component
-