ContourBuilder

class ContourBuilder(multipleContours: Boolean)

Constructors

Link copied to clipboard
fun ContourBuilder(multipleContours: Boolean)

Functions

Link copied to clipboard
fun arcTo(    crx: Double,     cry: Double,     angle: Double,     largeArcFlag: Boolean,     sweepFlag: Boolean,     end: Vector2)
fun arcTo(    crx: Double,     cry: Double,     angle: Double,     largeArcFlag: Boolean,     sweepFlag: Boolean,     tx: Double,     ty: Double)
Link copied to clipboard
fun circularArcTo(through: Vector2, end: Vector2)
Link copied to clipboard
fun close()

Closes the contour, adds a line segment to anchor when needed

Link copied to clipboard
fun continueTo(end: Vector2, tangentScale: Double = 1.0)
fun continueTo(    x: Double,     y: Double,     tangentScale: Double = 1.0)
fun continueTo(    control: Vector2,     end: Vector2,     tangentScale: Double = 1.0)
fun continueTo(    cx: Double,     cy: Double,     x: Double,     y: Double,     tangentScale: Double = 1.0)
Link copied to clipboard
fun copy(source: ShapeContour)
Link copied to clipboard
fun curveTo(control: Vector2, position: Vector2)
fun curveTo(    cx: Double,     cy: Double,     x: Double,     y: Double)

Quadratic curve to

fun curveTo(    control0: Vector2,     control1: Vector2,     position: Vector2)
fun curveTo(    c0x: Double,     c0y: Double,     c1x: Double,     c1y: Double,     x: Double,     y: Double)

Cubic curve to

Link copied to clipboard
fun lineTo(position: Vector2)
fun lineTo(x: Double, y: Double)

Line to

Link copied to clipboard
fun moveOrCurveTo(control: Vector2, position: Vector2)
fun moveOrCurveTo(    control0: Vector2,     control1: Vector2,     position: Vector2)
fun moveOrCurveTo(    cx: Double,     cy: Double,     x: Double,     y: Double)
fun moveOrCurveTo(    c0x: Double,     c0y: Double,     c1x: Double,     c1y: Double,     x: Double,     y: Double)
Link copied to clipboard
fun moveOrLineTo(position: Vector2)
fun moveOrLineTo(x: Double, y: Double)

Move the pen or draw a line to the given coordinates. The pen is moved without drawing when to prior moveTo instructions have been given.

Link copied to clipboard
fun moveTo(position: Vector2)

Move pen without drawing

fun moveTo(x: Double, y: Double)

Move the pen to the given coordinates without drawing

Link copied to clipboard
fun reverse()

Reverse all segments

Link copied to clipboard
fun segment(segment: Segment)
Link copied to clipboard
fun undo(): Segment?

Properties

Link copied to clipboard
var anchor: Vector2
Link copied to clipboard
var cursor: Vector2
Link copied to clipboard
val lastSegment: Segment?
Link copied to clipboard
val result: List<ShapeContour>
Link copied to clipboard
val segments: MutableList<Segment>

Sources

Link copied to clipboard