🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

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

Source set: Common
public enum class Type {
        /**
         * Move command, the path segment contains 1 point indicating the move destination. The
         * weight is set 0.0f and not meaningful.
         */
        Move,
        /**
         * Line curve, the path segment contains 2 points indicating the two extremities of the
         * line. The weight is set 0.0f and not meaningful.
         */
        Line,
        /**
         * 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.
         */
        Quadratic,
        /**
         * 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][PathSegment.weight] property.
         *
         * The conic weight determines the amount of influence conic control point has on the curve.
         * If the weight is less than one, the curve represents an elliptical section. If the weight
         * is greater than one, the curve represents a hyperbolic section. If the weight equals one,
         * the curve represents a parabolic section.
         */
        Conic,
        /**
         * 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.
         */
        Cubic,
        /**
         * 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.
         */
        Close,
        /**
         * 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.
         */
        Done,
    }

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

Members

Move

Source set: Common
Move

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

Line

Source set: Common
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.

Quadratic

Source set: Common
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.

Conic

Source set: Common
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.

The conic weight determines the amount of influence conic control point has on the curve. If the weight is less than one, the curve represents an elliptical section. If the weight is greater than one, the curve represents a hyperbolic section. If the weight equals one, the curve represents a parabolic section.

Cubic

Source set: Common
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.

Close

Source set: Common
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.

Done

Source set: Common
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.