line

fun Canvas.line(x1: Int, y1: Int, x2: Int, y2: Int, color: Color = Color.BLACK)
fun Canvas.line(x1: Float, y1: Float, x2: Float, y2: Float, color: Color = Color.BLACK)

Draws a line on the canvas.

Parameters

x1

The X coordinate of the first point

y1

The Y coordinate of the second point

x2

The X coordinate of the first point

y2

The Y coordinate of the second point

color

The color of the line


fun Canvas.line(pos1: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, pos2: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, color: Color = Color.BLACK)

Draws a line on the canvas.

Parameters

pos1

The coordinates of the first point

pos2

The coordinates of the second point

color

The color of the line


fun Canvas.line(x1: Int, y1: Int, x2: Int, y2: Int, thick: Float, color: Color = Color.BLACK)
fun Canvas.line(x1: Float, y1: Float, x2: Float, y2: Float, thick: Float, color: Color = Color.BLACK)

Draws a line on the canvas using triangles and quads.

Parameters

x1

The X coordinate of the first point

y1

The Y coordinate of the second point

x2

The X coordinate of the first point

y2

The Y coordinate of the second point

thick

The thickness of the line.

color

The color of the line


fun Canvas.line(pos1: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, pos2: ERROR CLASS: Symbol not found for Pair<kotlin/Float, kotlin/Float>, thick: Float, color: Color = Color.BLACK)

Draws a line on the canvas using triangles and quads.

Parameters

pos1

The coordinate of the first point

pos2

The coordinate of the second point

thick

The thickness of the line.

color

The color of the line