PathSegment.Type


public enum PathSegment.Type extends 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 methods

final @NonNull EnumEntries<@NonNull PathSegment.Type>

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

final @NonNull PathSegment.Type

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

final @NonNull PathSegment.Type[]

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

Enum Values

Close

PathSegment.Type PathSegment.Type.Close

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

PathSegment.Type PathSegment.Type.Conic

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

PathSegment.Type PathSegment.Type.Cubic

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

PathSegment.Type PathSegment.Type.Done

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

PathSegment.Type PathSegment.Type.Line

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

PathSegment.Type PathSegment.Type.Move

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

Quadratic

PathSegment.Type PathSegment.Type.Quadratic

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 methods

getEntries

public final @NonNull EnumEntries<@NonNull PathSegment.TypegetEntries()

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

valueOf

Added in 1.0.0
public final @NonNull PathSegment.Type valueOf(@NonNull String value)

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
public final @NonNull PathSegment.Type[] values()

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.