dolik.rce Messages: 1789 Registered: August 2008 Location: Czech Republic
Ultimate Contributor
Hello everyody!
I needed some fast and pretty graphics for my project, so I decided to write a Ctrl that would allow me to use Agg (http://www.antigrain.com) in Upp. After studying what was done in this topic before (DrawAgg and some other packages by Aris - gave me a lot of inspiration, thanks ) and bit of fighting with Xlib and Agg libraries, I finnaly got working version.
It currently runs only on X11, but I plan to make win32 too (or to find some volunteer to do it ). It also have some bugs concerning pixel formats (documented in source), but I hope to get rid of them soon. Most of the code is taken from original file agg_platform_support.cpp from Agg, just rewriten to work with Ctrl derived class.
The basic idea is that the Ctrl has it's own agg::rendering_buffer and everything is set up, so the only thing user have to do is to define member
void AggCtrl::onDraw()
and put there all the code to draw into the Ctrl's buffer.
I upload it here with working example and I'll be very glad for any feedback...
Bye dolik.rce
Update: I've fixed the uninitialized variables (see next post) and uploaded the new files here...
[Updated on: Wed, 24 September 2008 10:19] by Moderator