PathSegment


A path segment represents a curve (line, cubic, quadratic or conic) or a command inside a fully formed Path object.

A segment is identified by a type which in turns defines how many points are available (from 0 to 4 points, each point is represented by 2 floats) and whether the weight is meaningful. Please refer to the documentation of each type for more information.

A segment with the Move or Close is usually represented by the singletons DoneSegment and CloseSegment respectively.

Summary

Nested types

Type of a given segment in a Path, either a command (Type.Move, Type.Close, Type.Done) or a curve (Type.Line, Type.Cubic, Type.Quadratic, Type.Conic).

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

FloatArray

An array of points (2 floats per point) describing this segment, whose size depends on type.

Cmn
PathSegment.Type

The type that identifies this segment and defines the number of points.

Cmn
Float

Conic weight, only valid if type is Type.Conic.

Cmn

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

points

val pointsFloatArray

An array of points (2 floats per point) describing this segment, whose size depends on type.

type

val typePathSegment.Type

The type that identifies this segment and defines the number of points.

weight

val weightFloat

Conic weight, only valid if type is Type.Conic. See Type.Conic for more information.