TextToken

data class TextToken(val token: String, val x: Double, val y: Double, val width: Double, val tracking: Double)(source)

Represents a text token with specific positional and formatting attributes.

A TextToken contains a segment of text along with its position, width, and tracking information. It can be used to describe the layout and appearance of text in a graphical context.

Parameters

token

The text content of the token.

x

The horizontal position of the token.

y

The vertical position of the token.

width

The width of the token.

tracking

The tracking (letter spacing) applied to the token.

Constructors

Link copied to clipboard
constructor(token: String, x: Double, y: Double, width: Double, tracking: Double)

Creates a new instance of a TextToken.

Types

Link copied to clipboard
object Companion

Properties

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

Functions

Link copied to clipboard
fun shift(dx: Double, dy: Double): TextToken

Shifts the position of the text token by the specified amounts.