PathNodes

@Serializable(with = PathNodesSerializer::class)
sealed class PathNodes(values: List<String>, val isRelative: Boolean, val command: PathCommand, val minified: Boolean) : MethodSizeAccountable(source)

PathNodes is a sealed class that contains multiple classes to represent different commands of an SVG/AVG path. These classes include: MoveTo, ArcTo, VerticalLineTo, HorizontalLineTo, LineTo, CurveTo, ReflectiveCurveTo, QuadTo and ReflectiveQuadTo.

Inheritors

Constructors

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

Types

Link copied to clipboard
class ArcTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, CoordinatePoint

The ArcTo class represents the SVG/AVG "arc" command which is used to create an arc.

Link copied to clipboard
object Companion
Link copied to clipboard
class CurveTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, ControlPoint1, ControlPoint2, ControlPoint3

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

Link copied to clipboard
class HorizontalLineTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, CoordinateX

The HorizontalLineTo class represents the SVG/AVG "horizontal line to" command which is used to draw a horizontal line from the current point to a new point.

Link copied to clipboard
class LineTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, CoordinatePoint

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

Link copied to clipboard
class MoveTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, CoordinatePoint

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

Link copied to clipboard
class QuadTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, ControlPoint1, ControlPoint2

The QuadTo class represents the SVG/AVG "quadratic Bézier curve" command

Link copied to clipboard
class ReflectiveCurveTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, ControlPoint1, ControlPoint2

The ReflectiveCurveTo represents the SVG/AVG "smooth cubic Bézier" command.

Link copied to clipboard
class ReflectiveQuadTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, ControlPoint1

The ReflectiveQuadTo represents the SVG/AVG "reflective quadratic Bézier curve to" command, which is used to create a smooth quadratic Bézier curve.

Link copied to clipboard
class VerticalLineTo(values: List<String>, isRelative: Boolean, minified: Boolean) : PathNodes, CoordinateY

The VerticalLineTo class represents the SVG/AVG "vertical line to" command, which instructs the pen to move vertically by the specified amount.

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

Functions

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