I'm in search of a way to draw vector graphics (moderately complex
beziers) onto wxDC's. I'm using sodipodi to create the images, so I can
get them into SVG files. For the moment I'm saving each image as a
large bitmap and scaling as necessary, but this is far from ideal.
I do not need full alpha support (though I wouldn't complain if I got
it), but anti-aliasing would be good. Does anyone know of a way to do
this?
Thanks in advance,
···
--
Brian
Brian Victor wrote:
I'm in search of a way to draw vector graphics (moderately complex
beziers) onto wxDC's.
I'd never heard of sodipodi, but I just looked it up, and you're going
to have a hard time duplicating that kind of output. There are a few
options but none ready to use out of the box.
There is wxArt2d: wxArt2D download | SourceForge.net
It is a vector canvas for wxWindows, written in C++. It includes support
for SVG. Unfortunatly, it's not wrapped for use with Python, so you'd
have to do that yourself (I'm sure Robin would help).
Another library to check out is agg:
http://www.antigrain.com/
It is a C++ library to rendering graphics with high quality
anti0aliasing, etc. THe SciPy/Chaco project is using it to render
bitmaps for a Python based scientific plotting package, so I'm pretty
sure they have Python bindings working, and are planning on working out
an easy way to blit the results to a wxPython DC. You can get info about
that project from:
http://www.scipy.org/site_content/chaco
You could have to parse the SVG yourself, however, unless there is an
SVG parser out there you could use.
Good luck...
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov