Christopher Barker wrote: > Can Baran wrote: >> I would like to be able to use the GetFullExtent function of the wx.DC >> class for the text that I add on a floatcanvas with a given font. I want >> to write a function called def textExtent which returns the height and >> width in screen coordinates of a piece of text in the selected font >> place on a floatcanvas (for example via the AddText call). How can I do >> that? > > I'm a bit confused -- if you want the text extent in screen coords, then > you can just use the regular old DC.GetFullTextExtent method. You can > create a wx.ScreenDC to do this.
Using a wx.ClientDC will probably be faster. On OSX at least it has some optimizations in place if all you use it for is text measurement. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
