Page 1 of 1

Could somebody make a bit complex function for me :P

Posted: Thu Oct 13, 2011 7:38 pm
by perli55
This is pretty dumb but i am unable to figure it out :S
It should draw a box but the vectors can be of any position,
so top-left,top-right,down-left,down-right order restriction is bypassed,
it connect all the points with a line in the given order and fills the inside
and all with the given 32-bit color.

struct vector {
int x;
int y;
}

void drawBox(vector p1,vector p2,vector p3,vector p4,unsigned int color);