---
name: "hline"
section: "3alleg4"
platform: "linux"
package: "allegro4-doc"
version: "2:4.4.3.1-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/hline/3alleg4"
---

# hline(3alleg4)

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

## NAME

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

## SYNOPSIS

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

**void hline(BITMAP \*bmp, int x1, int y, int x2, int color);**

## DESCRIPTION

Draws a horizontal line onto the bitmap, from point (x1, y) to (x2, y).

Note: hline() is implemented as an alias to another function. See ALLEGRO\_NO\_VHLINE\_ALIAS in the \`Differences between platforms' section for details.

## SEE ALSO

**vline**(3alleg4), **line**(3alleg4), **drawing\_mode**(3alleg4), **makecol**(3alleg4), **exsprite**(3alleg4)
