A Couple of questions on OGL Lineshapes
Robin Dunn
robin at alldunn.com
Fri Jul 13 08:56:00 PDT 2007
Javier Cámara Moreno wrote:
> referring to the OGL (Object Graphics Library), provided with wx
> (wx.lib.ogl). The problem is specifically located in the LineShape
> class. When I try to add text I always get a background rectangle
> associated to the region of the line shape. I've seen several posts in
> forums describing the same problem (i.e., drawing the text on a
> transparent background) but haven't found any answers. I don't know if
> it is a bug or maybe there is a workaround to make that background
> transparent. Check out the following code snippet:
> ...
> line = ogl.LineShape()
> line.AddText('I want this text to be drawn on a
> transparent background')
> line.AddArrow(ogl.ARROW_ARROW,1,8,0.0,'',None,-1)
> line.SetBrush(wx.BLACK_BRUSH)
> line.MakeLineControlPoints(2)
> source.AddLine(line, target)
> self.canvas.AddShape(line)
> ...
>
> If there is anybody out there experienced with OGL, I'd appreciate very
> much a hint with this.
The person who ported OGL to Python (Pierre Hjälm) usually reads the
wxPython-users list, so you may be able to get a response from him, or
from one of the other wxPython users that may have also used OGL.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wx-users
mailing list