PolygonBuilder

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun arcBy(delta: Vector2, radius: Vector2, degrees: Double, largeArc: Boolean, sweep: Boolean): PolygonBuilder

Draw an arc relative to the previous point

Link copied to clipboard
fun arcTo(point: Vector2, radius: Vector2, degrees: Double, largeArc: Boolean, sweep: Boolean): PolygonBuilder
Link copied to clipboard
fun bezierBy(heading1: Vector2, heading2: Vector2, delta: Vector2): PolygonBuilder

Draw a bezier curve using relative values. A bezier curve is defined by the start and end points A and B, as well as control points B and C (which the line does NOT pass through).

Link copied to clipboard
fun bezierByTo(heading1: Vector2, heading2: Vector2, to: Vector2): PolygonBuilder

A bezier curve to to, where heading1 and heading2 are the control points relative to the current point, and to respectively.

Link copied to clipboard
Link copied to clipboard
fun build(): Polygon
fun build(autoCorrect: Boolean): Polygon
fun build(convexity: Int?): Polygon
fun build(convexity: Int?, autoCorrect: Boolean): Polygon
Link copied to clipboard
Link copied to clipboard
fun circularArcBy(by: Vector2, radius: Double, largeArc: Boolean, sweep: Boolean): PolygonBuilder

fun circularArcBy(dx: Double, dy: Double, radius: Double, largeArc: Boolean, sweep: Boolean): PolygonBuilder

Draw a circular arc relative to the previous point

Link copied to clipboard
fun circularArcTo(to: Vector2, radius: Double, largeArc: Boolean, sweep: Boolean): PolygonBuilder
fun circularArcTo(x: Double, y: Double, radius: Double, largeArc: Boolean, sweep: Boolean): PolygonBuilder
Link copied to clipboard
Link copied to clipboard

Draw a straight line relative to the previous point

Link copied to clipboard
Link copied to clipboard

Move relative to the previous point

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun tangentCircularArcTo(to: Vector2, fromTangent: Vector2, toTangent: Vector2)