LineTo

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

The LineTo class represents the SVG/AVG "line to" command used for creating a straight line.

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

The line is defined by destination point coordinates x and y. The origin of these coordinates can be absolute or relative based on the isRelative flag. If isRelative is true, x and y are treated as relative coordinates. Otherwise, they are treated as absolute.

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 new x-coordinate to which the line extends.

Link copied to clipboard
open override val y: Double

The new y-coordinate to which the line extends.

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.LineTo

Creates a copy of the LineTo command with the specified changes.

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