#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    29
    Rep Power
    0

    Drawing traingle using gdi, how?


    Hello friends

    I want to draw a simple triangle. Any help, feedback will be so helpful.
    Thank you already.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    156
    Rep Power
    3
    Most (if not all) GDI calls already wrapped in TCanvas. So you can use methods of TCanvas to do GDI "drawing". For your case, you would need to move the "pointer" to one corner of the triangle, draw a line to the next corner, then draw another line to the next corner, and finally draw the final line to the initial corner.

    Open help for TCanvas, and there you should find methods named MoveTo and Line (or was it LineTo?).

IMN logo majestic logo threadwatch logo seochat tools logo