[wxpython-users] Bus Error w/ GraphicsContext on OSX
Robin Dunn
robin at alldunn.com
Sat May 17 18:36:25 PDT 2008
Stephen Hansen wrote:
> Hi there; in my app, I have a chunk of code which is doing:
>
> dc = wx.MemoryDC()
> gc = wx.GraphicsContext.Create(dc)
>
> Then some basic stuff like:
>
> gc.SetBrush(wx.TRANSPARENT_BRUSH)
> gc.SetPen(wx.TRANSPARENT_PEN)
> gc.DrawRectangle(0, 0, self.IMAGE_WIDTH, 16)
>
> Basically, what I'm doing is trying to create an essentially empty
> temporary canvas to draw upon and such, which I then blit onto another
> DC and store as a bitmap. It works on windows fine. On the mac, however,
> the call to "wx.GraphicsContext.Create(dc)" immediately fails with a
> "Bus error". No traceback, nor any message in the Console provides any
> additional information-- so I'm not quite sure what to do about figuring
> out what's wrong.
Did you forget to put a wx.Bitmap into the memory dc or are you just not
showing that?
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list