SVG support

Has anyone here played with Agg in C++? I've thought about it but the
Agg stuff is so slow in Matplotlib that I figured Agg must not be that
fast. Is this just some issue with how it is interfaced to wxPython?

-Paul

···

-----Original Message-----
From: Christopher Barker [mailto:Chris.Barker@noaa.gov]
Sent: Wednesday, July 26, 2006 4:42 PM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] SVG support

Peter Damoc wrote:

I found this:
Jimmy's Python Pages

which is a proof of concept for a wrapper around the PIL AggDrawer --
useful, but won't help with the OP's issue.

Darn.

-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

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Lanier, Paul wrote:

Has anyone here played with Agg in C++?

not yet.

I've thought about it but the
Agg stuff is so slow in Matplotlib that I figured Agg must not be that
fast. Is this just some issue with how it is interfaced to wxPython?

And how matplotlib is written -- there are a lot of layers in there.

There is a key problem though: going from data to a wxImage to a wxBitmap that can then be drawn on the screen is pretty slow, partly because there is a lot of copying of data done.

Robin is looking into giving wxPython more direct access to wxBitmap data, but that may be tricky, as wx.Bitmaps use platform-native data formats, which can vary a lot.

Also, there has been chatter on and off about using Agg or Ciaro as the basis for the next generation DC. That's a while off, at best, and Cairo is slower then Agg, but it would be nice top get all the features.

-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

Christopher Barker wrote:

Lanier, Paul wrote:

Has anyone here played with Agg in C++?

not yet.

I've thought about it but the
Agg stuff is so slow in Matplotlib that I figured Agg must not be that
fast. Is this just some issue with how it is interfaced to wxPython?

And how matplotlib is written -- there are a lot of layers in there.

There is a key problem though: going from data to a wxImage to a wxBitmap that can then be drawn on the screen is pretty slow, partly because there is a lot of copying of data done.

Robin is looking into giving wxPython more direct access to wxBitmap data, but that may be tricky, as wx.Bitmaps use platform-native data formats, which can vary a lot.

Also, there has been chatter on and off about using Agg or Ciaro as the basis for the next generation DC. That's a while off, at best, and Cairo is slower then Agg, but it would be nice top get all the features.

-Chris

The OP might take a look at our (Enthought's) Kiva library. It wraps Agg with SWIG to provide a higher level interface to Agg. It can draw directly into native framebuffers on Windows and Linux using wx. If you want to use the Agg SVG support you may be able to modify Kiva to expose that capability at the Python level and have it blit into your wx application. I would strongly recommend using the version in svn.

Best Regards,

-Dave Kammeyer