---
name: "rect"
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/rect/3alleg4"
---

# rect(3alleg4)

Draws an outline rectangle. Allegro game programming library.

## NAME

rect - Draws an outline rectangle. Allegro game programming library.

## SYNOPSIS

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

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

## DESCRIPTION

Draws an outline rectangle with the two points as its opposite corners.

## SEE ALSO

**rectfill**(3alleg4), **drawing\_mode**(3alleg4), **makecol**(3alleg4), **ex3d**(3alleg4), **excamera**(3alleg4)
