---
name: "line"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://carta.tech/man/line/3alleg"
---

# line(3alleg)

Draws a line onto the bitmap. Allegro game programming library.

## NAME

line - Draws a line onto the bitmap. Allegro game programming library.

## SYNOPSIS

**#include \<allegro.h\>**

**void line(BITMAP \*bmp, int x1, int y1, int x2, int y2, int color);**

## DESCRIPTION

Draws a line onto the bitmap, from point (x1, y1) to (x2, y2).

## SEE ALSO

[**fastline**(3alleg)](/man/fastline/3alleg.md), [**hline**(3alleg)](/man/hline/3alleg.md), [**vline**(3alleg)](/man/vline/3alleg.md), [**do\_line**(3alleg)](/man/do_line/3alleg.md), [**drawing\_mode**(3alleg)](/man/drawing_mode/3alleg.md), [**makecol**(3alleg)](/man/makecol/3alleg.md)
