line

fun line(x1: Int, y1: Int, x2: Int, y2: Int, color: Color): Image

Draws a line on the current image.

Return

A new Image object with the drawn line on the image

Parameters

x1

The X coordinate of the first point.

y1

The Y coordinate of the first point.

x2

The X coordinate of the second point.

y2

The Y coordinate of the second point.

color

The color of the line.


fun line(x1: Int, y1: Int, x2: Int, y2: Int, thick: Int, color: Color): Image

Draws a line on the current image.

Return

A new Image object with the drawn line on the image.

Parameters

x1

The X coordinate of the first point.

y1

The Y coordinate of the first point.

x2

The X coordinate of the second point.

y2

The Y coordinate of the second point.

thick

The thickness of the line.

color

The color of the line.