Re: [matplotlib-devel] mathtext in wx widgets

2007-09-04 Thread John Hunter
On 8/31/07, Paul Kienzle <[EMAIL PROTECTED]> wrote: > That's wonderful! I'm attaching a screen shot for wx 2.8 on OS/X. > > The rendering is kind of ugly, but I haven't looked into it. My giess is that for some reason wx is not respecting the alpha channel -- that will give you the rough, chunky

Re: [matplotlib-devel] mathtext in wx widgets

2007-09-04 Thread Michael Droettboom
Just FYI -- this is what it looks like in Linux/wxGTK. Paul Kienzle wrote: On Fri, Aug 31, 2007 at 03:28:49PM -0400, Michael Droettboom wrote: There is now preliminary support for getting a mathtext bitmap to transfer to a GUI widget in SVN, along with a toy wxPython example in examples/mathte

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-31 Thread Paul Kienzle
On Fri, Aug 31, 2007 at 03:32:09PM -0400, Michael Droettboom wrote: > And placing bitmaps in menu items reportedly doesn't work at all on > wxCocoa. -- so maybe it's best to stay away from that altogether. The wxPython demo.py for menus has a smiley face bit map that displays just fine. Let me k

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-31 Thread Paul Kienzle
On Fri, Aug 31, 2007 at 03:28:49PM -0400, Michael Droettboom wrote: > There is now preliminary support for getting a mathtext bitmap to > transfer to a GUI widget in SVN, along with a toy wxPython example in > examples/mathtext_wx.py. I've only tested this on > Linux/wxGTK2/wxPython-2.8. I'd a

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-31 Thread Michael Droettboom
I should also mention my mathtext_wx.py example reveals a [possible] bug in wxPython-2.8 and/or the underlying Gtk. When you put a bitmap on a menu item, the *height* of the menu item is determined by the *width* of the bitmap. And placing bitmaps in menu items reportedly doesn't work at all o

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-31 Thread Michael Droettboom
There is now preliminary support for getting a mathtext bitmap to transfer to a GUI widget in SVN, along with a toy wxPython example in examples/mathtext_wx.py. I've only tested this on Linux/wxGTK2/wxPython-2.8. I'd appreciate help with testing (and screenshots) on any other platforms you ma

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-31 Thread Michael Droettboom
It would probably be considerable work to ply mathtext out of matplotlib, particularly if you consider bringing along the Ps/Pdf/Svg/Cairo backends. Just bringing the raster backend (which is really in ft2font.cpp) would be considerably less work. But I was mainly just sharing a "wouldn't it b

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-30 Thread Paul Kienzle
On Thu, Aug 30, 2007 at 01:56:36PM -0500, John Hunter wrote: > On 8/30/07, Michael Droettboom <[EMAIL PROTECTED]> wrote: > > > (And long term, as cool as matplotlib is, it would be nice to refactor > > this out as a separate library for apps that don't do any plotting...) > > I agree, the mathtex

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-30 Thread Christopher Barker
Paul Kienzle wrote: > It would be great to be able to display math markup in other parts of my > application, such as labels, tables, lists and menus. Has anyone ever > tried doing this for wx or gtk? It's worth a post to the wxPython-users list -- it gets talked about now and again. It shouldn

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-30 Thread John Hunter
On 8/30/07, Michael Droettboom <[EMAIL PROTECTED]> wrote: > (And long term, as cool as matplotlib is, it would be nice to refactor > this out as a separate library for apps that don't do any plotting...) I agree, the mathtext stuff is becoming really good, and will be really good when we have a g

Re: [matplotlib-devel] mathtext in wx widgets

2007-08-30 Thread Michael Droettboom
Cool idea. I don't know if anyone has tried this. I assume you'd want to get something that you could pass to wx.ImageFromBuffer() (and the equivalent in Gtk). It would just be a matter of or'ing together all of the greyscale ft2font buffers (which aren't currently exposed to Python) and con