GDIndex.gif Previous-2.gif Next-3.gif

GD2d_draw_polyline- GD API


Synopsis

draw polylines


void GD2d_draw_polyline
(state, vcount, vert, fcolor, vcolor)
GDstate *state;
int vcount;
SHORT2 vert[];
FLOAT3 fcolor[];
FLOAT3 vcolor[];

 

Description

GD2d_draw_polyline draws a single polyline; that is, a series of connected lines, although the renderer does not automatically connect the last line to the first.

Here is what a polyline looks like, with the polyline's vertices numbered:

 

GENERATE/fh349061.gif

You set vcount to the number of vertices.

vert should specify vcount pairs of x and y values.

fcolor should be NULL. Or it should specify a color for each line segment; that is, ( vcount - 1) sets of red, green, and blue values.

vcolor should be NULL, or specify vcount sets of red, green, and blue values.