---
name: "ggiDrawLine"
section: "3"
platform: "linux"
package: "libggi2-dev"
version: "1:2.2.2-5"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/ggiDrawLine"
---

# ggiDrawLine(3)

Draw a line on a visual

## NAME

**ggiDrawLine** - Draw a line on a visual

## SYNOPSIS

```
#include <ggi/ggi.h>
int ggiDrawLine(ggi_visual_t vis, int x, int y, int xe, int ye);
```

## DESCRIPTION

Draws any line, using the current foreground color set by `ggiSetGCForeground(3)`, from (*x*, *y*) to (*xe*, *ye*). The line is exact; the pixel set is no more than 0.5 pixels off the place it should be.

## RETURN VALUE

This function returns **0** to indicate success.

## SEE ALSO

`ggiDrawHLine(3)`, `ggiDrawVLine(3)`
