MoveTo

class MoveTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, CoordinatePoint(source)

The MoveTo represents the SVG/AVG command to move the pen to a new location.

It's a type of PathNodes which holds SVG/AVG command parameters.

The new location is determined using the specified x and y coordinates. The unit of these coordinates is determined based on the isRelative value. If isRelative is true, the x and y are treated as relative coordinates otherwise they are treated as absolute coordinates.

The class contains an overridden materialize function which returns a String representation of the SVG/AVG command in the form required by the Compose path functions.

Constructors

Link copied to clipboard
constructor(values: List<String>, isRelative: Boolean, minified: Boolean)

Properties

Link copied to clipboard
open override val approximateByteSize: Int

Calculates the approximate bytecode size of the path nodes. Accounts for method invocation byte size, float byte sizes, and additional byte size if the path should be closed.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val x: Double

The x-coordinate value.

Link copied to clipboard
open override val y: Double

The y-coordinate value.

Functions

Link copied to clipboard
fun copy(x: Double = this.x, y: Double = this.y, isRelative: Boolean = this.isRelative, minified: Boolean = this.minified, shouldClose: Boolean = this.shouldClose): PathNodes.MoveTo

Creates a copy of this MoveTo with the given properties.

Link copied to clipboard
open fun materialize(): String
Link copied to clipboard
open override fun toString(): String