Main Page   Modules   File List   Globals  

line.c File Reference

Line drawing. More...


Functions

void caca_draw_line (int x1, int y1, int x2, int y2, char c)
 Draw a line on the screen using the given character.

void caca_draw_polyline (int const x[], int const y[], int n, char c)
 Draw a polyline on the screen using the given character and coordinate arrays. The first and last points are not connected, so in order to draw a polygon you need to specify the starting point at the end of the list as well.

void caca_draw_thin_line (int x1, int y1, int x2, int y2)
 Draw a thin line on the screen, using ASCII art.

void caca_draw_thin_polyline (int const x[], int const y[], int n)
 Draw a thin polyline on the screen using the given coordinate arrays and with ASCII art. The first and last points are not connected, so in order to draw a polygon you need to specify the starting point at the end of the list as well.


Detailed Description

Version:
$Id: line.c 219 2004-01-07 12:45:02Z sam $
Author:
Sam Hocevar <sam@zoy.org> This file contains line and polyline drawing functions, with both thin and thick styles.

Function Documentation

void caca_draw_line int    x1,
int    y1,
int    x2,
int    y2,
char    c
 

Parameters:
x1  X coordinate of the first point.
y1  Y coordinate of the first point.
x2  X coordinate of the second point.
y2  Y coordinate of the second point.
c  Character to draw the line with.
Returns:
void

void caca_draw_polyline int const    x[],
int const    y[],
int    n,
char    c
 

Parameters:
x  Array of X coordinates. Must have n + 1 elements.
y  Array of Y coordinates. Must have n + 1 elements.
n  Number of lines to draw.
c  Character to draw the lines with.
Returns:
void

void caca_draw_thin_line int    x1,
int    y1,
int    x2,
int    y2
 

Parameters:
x1  X coordinate of the first point.
y1  Y coordinate of the first point.
x2  X coordinate of the second point.
y2  Y coordinate of the second point.
Returns:
void

void caca_draw_thin_polyline int const    x[],
int const    y[],
int    n
 

Parameters:
x  Array of X coordinates. Must have n + 1 elements.
y  Array of Y coordinates. Must have n + 1 elements.
n  Number of lines to draw.
Returns:
void