[wxPython-users] Changes in ClientDC on OS-X

Christopher Barker Chris.Barker at noaa.gov
Mon Dec 10 16:52:34 PST 2007


Christopher Barker wrote:
> Chris Mellon wrote:
>> It's not well documented in wx, but this sort of drawing isn't well
>> supported in OS X, and there's special mechanisms for doing it.

Well, more poking around. I was thinking that there were issues with =

wxClientDC, but it's not that. The problem is with SetLogicalMode. It =

turns out that if I turn that off, the drawing works fine.

However, how can I draw something, then get the original back without =

it? I though the while XOR trick was really, really nifty!

I did do another implementation where I put the drawing of the line in =

method called in OnPaint, then called Refresh() when I wanted it drawn. =

This re-blits the window with every mouse move, but it does seem to be =

blazingly fast. However, I still have a problem:

I want to be able to draw a dotted line that I know the user will be =

able to see regardless of the colors that are on the screen. Drawing on =

top with dc.SetLogicalFunction(wx.XOR) did this beautifully. How else =

can I do it?

-Chris

Alternative implementation enclosed

-- =

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ClientDCTest2.py
Type: text/x-python
Size: 5617 bytes
Desc: not available
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20071=
210/c149ff1c/ClientDCTest2.py


More information about the wxpython-users mailing list