PathSegment.Type


enum PathSegment.Type : Enum


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

Summary

Enum Values

Close

Close command, close the current contour by joining the last point added to the path with the first point of the current contour.

Conic

Conic curve, the path segment contains 3 points in the following order:

Cubic

Cubic curve, the path segment contains 4 points in the following order:

Done

Done command, which indicates that no further segment will be found in the path.

Line

Line curve, the path segment contains 2 points indicating the two extremities of the line.

Move

Move command, the path segment contains 1 point indicating the move destination.

Quadratic

Quadratic curve, the path segment contains 3 points in the following order:

Public functions

PathSegment.Type
valueOf(value: String)

Returns the enum constant of this type with the specified name.

Array<PathSegment.Type>

Returns an array containing the constants of this enum type, in the order they're declared.

Public properties

EnumEntries<PathSegment.Type>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Enum Values

Close

val PathSegment.Type.ClosePathSegment.Type

Close command, close the current contour by joining the last point added to the path with the first point of the current contour. The segment does not contain any point. The weight is set 0.0f and not meaningful.

Conic

val PathSegment.Type.ConicPathSegment.Type

Conic curve, the path segment contains 3 points in the following order:

  • Start point

  • Control point

  • End point

The curve is weighted by the weight property.

Cubic

val PathSegment.Type.CubicPathSegment.Type

Cubic curve, the path segment contains 4 points in the following order:

  • Start point

  • First control point

  • Second control point

  • End point

The weight is set 0.0f and not meaningful.

Done

val PathSegment.Type.DonePathSegment.Type

Done command, which indicates that no further segment will be found in the path. It typically indicates the end of an iteration over a path and can be ignored.

Line

val PathSegment.Type.LinePathSegment.Type

Line curve, the path segment contains 2 points indicating the two extremities of the line. The weight is set 0.0f and not meaningful.

Move

val PathSegment.Type.MovePathSegment.Type

Move command, the path segment contains 1 point indicating the move destination. The weight is set 0.0f and not meaningful.

Quadratic

val PathSegment.Type.QuadraticPathSegment.Type

Quadratic curve, the path segment contains 3 points in the following order:

  • Start point

  • Control point

  • End point

The weight is set 0.0f and not meaningful.

Public functions

valueOf

Added in 1.0.0
fun valueOf(value: String): PathSegment.Type

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

Added in 1.0.0
fun values(): Array<PathSegment.Type>

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

Public properties

entries

val entriesEnumEntries<PathSegment.Type>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.