---
name: "Image.line"
section: "3kaya"
platform: "linux"
package: "kaya"
version: "0.4.4-6.2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Image.line"
---

# Image.line(3kaya)

Draw a line.

## NAME

Image::line - Draw a line.

## SYNOPSIS

**Void line(** *Image img, Int x1, Int y1, Int x2, Int y2, Colour col* **)**

## ARGUMENTS

**img** The image

**x1** X coordinate of first endpoint

**y1** Y coordinate of first endpoint

**x2** X coordinate of second endpoint

**y2** Y coordinate of second endpoint

**col** Colour of the line

## DESCRIPTION

Draws a line on the image from ( *x1* , *y1* ) to ( *x2* , *y2* ).

## AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

## LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

## RELATED

**Image.dashedLine (3kaya)**

**Image.rectangle (3kaya)**
