PDA

Click to See Complete Forum and Search --> : Drawing Triangles


bob323
Jan 18th, 2002, 01:55 PM
Simple one here but I think I just need to see how it works to make it all go. How do I draw a triangle in a windows app? I have been trying to use polygon but that is just not working...

parksie
Jan 18th, 2002, 05:56 PM
POINT pts[3];
pts[0].x = 0;
pts[0].y = 0;
pts[1].x = 6;
pts[1].y = 0;
pts[2].x = 3;
pts[2].y = 6;

Polygon(hDC, pts, 3);Obviously it's not a totally accurate triangle as far as the points go, so you'd have to calculate them properly.