Christopher Barker wrote:
> Michael Droettboom wrote:
>> Creates a wx.GraphicsContext from a native context. This native
>> context must be eg a CGContextRef for Core Graphics, a Graphics
>> pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For
>> wxPython we still need a way to make this value usable.
> If we really think that would help, and we would use it for MPL, we
> could try to get it done -- but I doubt that it's worth it -- we have
> enough trouble keeping the wx back-ends maintained as it is.
Yes --- there is something to be said for keeping the number of backends
to a minimum. Each one needs to have a reason to exist ;)
>>> If you can come up with an self-contained example of this, a post
>>> tot he wxPython list may yield results.
>> It might be worth it just to get to the bottom of this.
> so are you working on an example? Or should I?
I'm happy to do it, but may not get to it for a few days. My own test
was to run "simple_plot_fps.py" with "handle_clip_rectangle" (in
backend_wx.py) turned on and off. But obviously the wxPython folks will
want a more standalone example.
>> I think the best we'll be able to do performance-wise with
>> wx.GraphicsContext is the same as the Cairo backend (since
>> wx.GraphicsContext is built on top of Cairo on X11, at least)
> so, does Cairo render a bitmap, and then push that to the X Server? If
> so, that would explain why the new wx backend isn't any better than
> wxAgg with remote X connections -- and that's was the only reason I
> know to use it.
I believe it does from what I've read (assuming one isn't using the
OpenGL backend), but don't know that first hand.
>> already slower than Agg, so there's no compelling reason for the Wx
>> backend to exist, IMHO, *unless* it needs to integrate with other
>> code that draws to a wx.GraphicsContext.
> I cant really imagine why anyone would try to do that -- and if you
> really wanted to, you could still transfer the Agg buffer to a
> wxBitmap, and draw to that with GraphicsContext anyway.
> So, like you, I'm curious (and I need GraphicsContext for other
> projects), so I'd still like to know what the deal is.
Thanks for all the info so far... Hopefully we can get to the bottom of
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA