GrAPiC
Graphics for Algo/Prog in C/C++

◆ polygon()

void grapic::polygon ( int  p[][2],
unsigned int  number 
)

Draw a polygon. (Code provided by Bastien DOIGNIES, many thanks)

int p[4][2];
p[0][0] = 20; p[0][1] = 20; // sommet 0, coord X et Y
p[1][0] = 200; p[1][1] = 20; // sommet 1, coord X et Y
p[2][0] = 200; p[2][1] = 200; // sommet 2, coord X et Y
p[3][0] = 20; p[3][1] = 200; // sommet 3, coord X et Y
polygon(p, 4);
void polygon(int p[][2], unsigned int number)
Draw a polygon. (Code provided by Bastien DOIGNIES, many thanks)