tangentArcTo

fun tangentArcTo(x1: Float, y1: Float, x2: Float, y2: Float, radius: Float): Path

Appends arc to Path, after appending line if needed. Arc is implemented by conic weighted to describe part of circle. Arc is contained by tangent from last Path point to (x1, y1), and tangent from (x1, y1) to (x2, y2). Arc is part of circle sized to radius, positioned so it touches both tangent lines.

If last Path Point does not start Arc, tangentArcTo appends connecting Line to Path. The length of Vector from (x1, y1) to (x2, y2) does not affect Arc.

Arc sweep is always less than 180 degrees. If radius is zero, or if tangents are nearly parallel, tangentArcTo appends Line from last Path Point to (x1, y1).

tangentArcTo appends at most one Line and one conic.

tangentArcTo implements the functionality of PostScript arct and HTML Canvas tangentArcTo.

Return

reference to Path

Parameters

x1

x-axis value common to pair of tangents

y1

y-axis value common to pair of tangents

x2

x-axis value end of second tangent

y2

y-axis value end of second tangent

radius

distance from arc to circle center

See also


fun tangentArcTo(p1: Point, p2: Point, radius: Float): Path

Appends arc to Path, after appending line if needed. Arc is implemented by conic weighted to describe part of circle. Arc is contained by tangent from last Path point to p1, and tangent from p1 to p2. Arc is part of circle sized to radius, positioned so it touches both tangent lines.

If last Path Point does not start arc, tangentArcTo() appends connecting line to Path. The length of vector from p1 to p2 does not affect arc.

Arc sweep is always less than 180 degrees. If radius is zero, or if tangents are nearly parallel, tangentArcTo() appends line from last Path Point to p1.

tangentArcTo() appends at most one line and one conic.

tangentArcTo() implements the functionality of PostScript arct and HTML Canvas tangentArcTo.

Return

reference to Path

Parameters

p1

Point common to pair of tangents

p2

end of second tangent

radius

distance from arc to circle center