Vector graphics
-
i am currently trying to develop vector graphic drawing app with visual c++. but somehow, i cant get any formula to draw smooth curve or circle. does anyone know the way or formulae to do so? thanx for helping first!
Well first question is what do mean by "smooth curve" - do you mean an antialiased line/curve ? If you just want to draw curves etc, then you can use PolyBezierTo or PolyBezier. Either one will draw cubic bezier curves with the GDI. If you do want anti aliased lines good luck !!! Sadly there are very few really good 2d vector libs out there, though there is one called LibArt, by Raph Levien which does absolutely fantastic output. It is written all in C and does all it's work in a buffer, so you could take the buffer and then dump it to an HBITMAP. Check out www.levien.com. It has only gcc makefiles available but I was able to make it work under VC++ with little trouble. I have had problems using it under C++ progs though - not sure why - probably something stupid on my part :) Hope this helps