Using Agg for my own purposes

Matplotlib wraps the Antigrain library quite nicely, and now I'd
like to use the bindings for my own nefarious purposes. Right now,
what I'd like is to create a (probably modified) FigureCanvas, and be
able to call Renderer function to draw my own graphics. I'd embed
this object in my GTK app, so I'm looking at the GTKAgg stuff. I've
traced down FigureCanvasGTK as inheriting from gtk.DrawingArea, which
I've (awkwardly) used before. I'd like to call Agg drawing functions
though, to get the nice anti-aliasing. So I'm looking at RendererAgg.
    If I create a FigureCanvasGTKAgg with a Figure object I'm not
going to use, I can extract the RendererAgg with get_renderer(), at
which point I should be able to call Agg drawing functions. But I
don't understand what kind of graphics contexts are being used as
parameters to those functions.
    Is this even the right way to go? I want to do all my own Agg
drawing, preferably offscreen with an update() function I call
periodically. Eventually I can write my own FigureCanvas-like class
that inherits from the right classes (from my UI toolkit's drawing
widget, and from RendererAgg that exposes the Agg .so) and omits all
the axes stuff that Matplotlib cares about.
    Thoughts, pointers, please? Thanks

···

--
    -- Graeme
    graeme.lufkin@...287...

Graeme Lufkin wrote:

    Matplotlib wraps the Antigrain library quite nicely, and now I'd
like to use the bindings for my own nefarious purposes.

Perhaps it would be easier to use agg-draw:

http://effbot.org/downloads/#aggdraw

If not, I'd love to see a general purpose python binding to Agg. Personally, I'd use it with wxPython.

-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@...259...