CurveTo

The CurveTo class represents the SVG/AVG "curve to" command which is used to create a cubic Bézier curve.

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

This class contains several properties representing the command parameters. In particular, values defines a set of values that represent the [x1, y1], [x2, y2], and [x3, y3] coordinates of the first, second control points, and the end point of the curve.

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 x1: Double

The x-coordinate value of the first control point.

Link copied to clipboard
open override val x2: Double

The x-coordinate value of the second control point.

Link copied to clipboard
open override val x3: Double

The x-coordinate value of the third control point.

Link copied to clipboard
open override val y1: Double

The y-coordinate value of the first control point.

Link copied to clipboard
open override val y2: Double

The y-coordinate value of the second control point.

Link copied to clipboard
open override val y3: Double

The y-coordinate value of the third control point.

Functions

Link copied to clipboard
fun copy(x1: Double = this.x1, y1: Double = this.y1, x2: Double = this.x2, y2: Double = this.y2, x3: Double = this.x3, y3: Double = this.y3, isRelative: Boolean = this.isRelative, minified: Boolean = this.minified, shouldClose: Boolean = this.shouldClose): PathNodes.CurveTo

Creates a copy of the CurveTo command with the specified values.

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