Cursor

class Cursor(var x: Double = 0.0, var y: Double = 0.0)(source)

Represents a 2D coordinate or position in a Cartesian space.

The Cursor class is primarily used to track and manipulate positions, typically for rendering or layout purposes. It includes x and y properties for horizontal and vertical positioning, respectively.

This class allows creating a new cursor at a specified position or duplicating an existing Cursor instance.

Parameters

x

The horizontal position. Default is 0.0.

y

The vertical position. Default is 0.0.

cursor

The Cursor instance to duplicate.

Constructors

Link copied to clipboard
constructor(x: Double = 0.0, y: Double = 0.0)

Initializes the cursor using specific x and y coordinates.

constructor(cursor: Cursor)

Properties

Link copied to clipboard
var x: Double
Link copied to clipboard
var y: Double