Main Page   Modules   File List   Globals  

triangle.c File Reference

Triangle drawing. More...


Functions

void caca_draw_triangle (int x1, int y1, int x2, int y2, int x3, int y3, char c)
 Draw a triangle on the screen using the given character.

void caca_draw_thin_triangle (int x1, int y1, int x2, int y2, int x3, int y3)
 Draw a thin triangle on the screen.

void caca_fill_triangle (int x1, int y1, int x2, int y2, int x3, int y3, char c)
 Fill a triangle on the screen using the given character.


Detailed Description

Version:
$Id: triangle.c 195 2003-12-31 14:21:08Z sam $
Author:
Sam Hocevar <sam@zoy.org> This file contains triangle drawing functions, both filled and outline.

Function Documentation

void caca_draw_thin_triangle int    x1,
int    y1,
int    x2,
int    y2,
int    x3,
int    y3
 

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.
x3  X coordinate of the third point.
y3  Y coordinate of the third point.
Returns:
void

void caca_draw_triangle int    x1,
int    y1,
int    x2,
int    y2,
int    x3,
int    y3,
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.
x3  X coordinate of the third point.
y3  Y coordinate of the third point.
c  Character to draw the triangle outline with.
Returns:
void

void caca_fill_triangle int    x1,
int    y1,
int    x2,
int    y2,
int    x3,
int    y3,
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.
x3  X coordinate of the third point.
y3  Y coordinate of the third point.
c  Character to fill the triangle with.
Returns:
void