[wxPython-users] wxPython 2.6.3 stipple not supported under GTK?

Robin Dunn robin at alldunn.com
Wed May 2 13:57:49 PDT 2007


Daniel B. Koch wrote:
> Can someone confirm that using a bitmap stipple for a brush does not 
> work under wxPython 2.6.3 and GTK?

No, it does, although it could depend on the version of GTK that is 
being used.  For example this PyCrust session on my machine results in a 
frame filled with whatever garbage that was in the uninitialized 
bitmap's memory buffer:


  PyShell 0.9.5 - The Flakiest Python Shell
  Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
  [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  Startup script executed: /home/robind/bin/pythonstartup.py
  >>> import wx
  >>> wx.VERSION
  (2, 6, 3, 3, '')
  >>> f = wx.Frame(None)
  >>> f.Show()
  True
  >>> dc = wx.ClientDC(f)
  >>> dc.SetBackground(wx.Brush("blue"))
  >>> dc.Clear()
  >>> b = wx.Brush("white", wx.STIPPLE)
  >>> b.SetStipple(wx.EmptyBitmap(15,15))
  >>> dc.SetBackground(b)
  >>> dc.Clear()
  >>>

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list