Global Function

triangle()

Declaration

func triangle(x1: Double, y1: Double, x2: Double, y2: Double, x3: Double, y3: Double)

Parameters

x1, y1 first point of the triangle.
x2, y2 second point of the triangle.
x3, y3 third point of the triangle.

Returns

-

Description

Draws a triangle in the view.

Examples

triangle(x1: 50, y1: 80, x2: 60, y2: 80, x3: 55, y3: 200 )

Related

lineWidth()
strokeColor() fillColor()