Anti-aliased graphics - recommendations?
Ole Nielsby
ole.nielsby at tekare-you-spamminglogisk.dk
Sun Sep 16 12:44:52 PDT 2007
I'm trying to find out what's the best way to paint diagrams with
anti-aliasing, and I seem to have lost my way.
What I would like is a widget that holds a svg-like representation
of an object and renders it on paint events.
(Like the ogl contrib but with anti-aliasing and better memory
management - the ogl is a bit too simplistic.)
So I experimented with various packages and didn't quite find
what I was looking for.
There is Anti-Grain Geometry http://antigrain.com/ which does
2d rendering and can work with wxImage data. There is a
wxWidgets example app that shows a lion kitten constructed
from vertices; I was able to cut-and-paste it into my own
wxWidget app without much trouble but I can't find out
how to do simple drawings - the docs are nice-looking but
focused on low-level stuff like how the picture is split into
raster lines - it's not obvious how to feed AGG with vertices.
There is an svg viewer sample but I can't make out its workings.
Then, there is OpenSceneGraphics which is an OpenGL
wrapper with an elaborate object model including cameras,
ligbtbulbs and wild beasts. It comes with a wxWidgets
sample but things went wrong when I tried to transfer the
techniques used in the sample to my own app. I was able
to create a window which was supposed to show a cow
but the cow wasn't there and when I closed the window
I invariably got memory leaks or crashes. Besides, it is a
rather large library and I really just need rounded boxes
with round corners...
What have others done to draw charts using wxWidgets?
More information about the wx-users
mailing list