---
name: "ggiDrawLine"
section: "3ggi"
platform: "linux"
package: "libggi2-dev"
version: "1:2.0.1-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/ggiDrawLine/3ggi"
---

# ggiDrawLine(3ggi)

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***);** .SH "DESCRIPTION"

Draws any line, using the current foreground color, 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)](/ggiDrawHLine/3.md), [**ggiDrawVLine**(3)](/ggiDrawVLine/3.md)
