triangle

fun Canvas.triangle(x1: Int, y1: Int, x2: Int, y2: Int, x3: Int, y3: Int, color: Color = Color.BLACK)

Draws a triangle outline on the canvas.

Note that the vertexes are specified and will be drawn in counter-clockwise order.

Parameters

x1

The X coordinate of the first vertex

y1

The Y coordinate of the first vertex

x2

The X coordinate of the second vertex

y2

The Y coordinate of the second vertex

x3

The X coordinate of the third vertex

y3

The Y coordinate of the third vertex

color

The color of the triangle