Results 1 to 2 of 2

Thread: Drawing Triangles

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    183

    Drawing Triangles

    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...

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Code:
    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.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width