Global Function

line()

Declaration

func line(x1: Double, y1: Double, x2: Double, y2: Double)

Parameters

x1, y1 first (start) endpoint of the line.
x2, y2 second (end) endpoint of the line.

Returns

-

Description

Draws a line in the view.

Examples

line(x1: 50, y1: 80, x2: 40, y2: 40)

Related

lineWidth()
strokeColor()