PathSegment


class 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 3) 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?)
open Int
open String

Public properties

Array<PointF>

An array of points describing this segment, whose size depends on type.

PathSegment.Type

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

Float

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

Public functions

equals

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

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

points

Added in 1.0.0
val pointsArray<PointF>

An array of points describing this segment, whose size depends on type.

type

Added in 1.0.0
val typePathSegment.Type

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

weight

Added in 1.0.0
val weightFloat

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