lineTo

fun lineTo(x: Float, y: Float): Path

Adds line from last point to (x, y). If Path is empty, or last Verb is PathVerb.CLOSE, last point is set to (0, 0) before adding line.

lineTo() appends PathVerb.MOVE to verb array and (0, 0) to Point array, if needed. lineTo() then appends PathVerb.LINE to verb array and (x, y) to Point array.

Return

this

Parameters

x

end of added line on x-axis

y

end of added line on y-axis

See also


fun lineTo(p: Point): Path

Adds line from last point to Point p. If Path is empty, or last PathVerb is PathVerb.CLOSE, last point is set to (0, 0) before adding line.

lineTo() first appends PathVerb.MOVE to verb array and (0, 0) to Point array, if needed. lineTo() then appends PathVerb.LINE to verb array and Point p to Point array.

Return

reference to Path

Parameters

p

end Point of added line