Logo Search packages:      
Sourcecode: libcaca version File versions  Download package

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.

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

Definition at line 93 of file line.c.

References clip_line(), and draw_solid_line().

{
    int i;
    struct line s;
    s.c = c;
    s.draw = draw_solid_line;

    for(i = 0; i < n; i++)
    {
        s.x1 = x[i];
        s.y1 = y[i];
        s.x2 = x[i+1];
        s.y2 = y[i+1];
        clip_line(&s);
    }
}


Generated by  Doxygen 1.6.0   Back to index