Drawing an arrow
-
Hi, I'm trying to draw an arrow in a DC. i have a line, consisting of the starting point(aa) and the ending point(bb). (CPoint variables) I do a Moveto (aa) and then a LineTo (bb). What i want to do, is like a triangle, the end of an arrow (or just two lines), but i haven't came up with ideas. The problem is that the line can be in any direction, not just horizontal or vertical. how could i do that with just aa and bb(the start and end of the line)?? thanks!!
-
Hi, I'm trying to draw an arrow in a DC. i have a line, consisting of the starting point(aa) and the ending point(bb). (CPoint variables) I do a Moveto (aa) and then a LineTo (bb). What i want to do, is like a triangle, the end of an arrow (or just two lines), but i haven't came up with ideas. The problem is that the line can be in any direction, not just horizontal or vertical. how could i do that with just aa and bb(the start and end of the line)?? thanks!!
If you want to use GDI+ you can use the Pen::SetStartCap() and Pen::SetEndCap() functions to have GDI+ draw the arrow heads for you. AFAIK, with GDI you have calculate and draw the arrow heads yourself.
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!
-
If you want to use GDI+ you can use the Pen::SetStartCap() and Pen::SetEndCap() functions to have GDI+ draw the arrow heads for you. AFAIK, with GDI you have calculate and draw the arrow heads yourself.
[
](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!
-
Searching is wonderful... http://www.codeproject.com/vcpp/gdiplus/vc6gdiplusmacro.asp[^]
"No matter where you go, there your are." - Buckaroo Banzai
-pete
-
thanks! i'm getting this error: fatal error C1083: Cannot open include file: 'gdiplus.h': No such file or directory should i download microsoft's latest sdk? sorry for the questions, i'm kind of a beginner in this
yes, which is explained in this article on codeproject http://www.codeproject.com/vcpp/gdiplus/startinggdiplus.asp[^] which you can find by doing a Google search. You will find that productivity in software development is directly related to your ability to search for, read and understand documentation, articles and examples... even the bad ones :-D
"No matter where you go, there your are." - Buckaroo Banzai
-pete
-
yes, which is explained in this article on codeproject http://www.codeproject.com/vcpp/gdiplus/startinggdiplus.asp[^] which you can find by doing a Google search. You will find that productivity in software development is directly related to your ability to search for, read and understand documentation, articles and examples... even the bad ones :-D
"No matter where you go, there your are." - Buckaroo Banzai
-pete