Segment

fun Segment(start: Vector2, end: Vector2, corner: Boolean = true)

Linear segment constructor.

Parameters

start

The starting anchor point.

end

The ending anchor point.

fun Segment(start: Vector2, c0: Vector2, end: Vector2, corner: Boolean = true)

Quadratic Bézier segment constructor.

Parameters

start

The starting anchor point.

c0

The control point.

end

The ending anchor point.

fun Segment(start: Vector2, c0: Vector2, c1: Vector2, end: Vector2, corner: Boolean = true)

Cubic Bézier segment constructor.

Parameters

start

The starting anchor point.

c0

The first control point.

c1

The second control point

end

The ending anchor point.

fun Segment(start: Vector2, control: Array<Vector2>, end: Vector2, corner: Boolean = true)