From: Bruce S. <Bru...@nc...> - 2012-11-29 23:04:05
|
Thanks to some help from experts in the wxPython forum, for the first time I managed to display text on an object, using platform-independent code. It's not yet part of the VPython-wx experimental package, because I have to integrate this capability with the label machinery, but this was the last issue preventing the elimination of platform-dependent code. The key breakthrough was to realize that wxPython has functions for writing 2D text and graphics to an off-screen bitmap and then reading back the numeric data from the bitmap. This array of data can be passed to the existing numeric texture option in VPython. This capability can be exploited by the label object, but it will also make it possible to place text on any object. Bruce Sherwood |