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

Christopher Barker Chris.Barker at noaa.gov
Mon Dec 10 22:14:37 PST 2007


Robin Dunn wrote:

> Try wx.INVERT instead of wx.XOR.

Will do, when I get back to my Mac.

> BTW, what version of OS X do you have?  Your first sample worked fine 
> for me on both 10.5 and 10.4.

I'm running 10.4 ( I think the next to last update) Python 2.5, but he way.


> My understanding of the changes related to wx.ClientDC are that it is 
> intended to still work (although I know there are some situations that 
> don't)

It does seem to work -- I"m having an XOR problem, and that's an issue 
with PaintDC too.

> but that it will be much more efficient to use a different 
> drawing model.

I've actually got it in m y todo to re-factor this -- from a long 
conversation with Stefan et al a while back, but it's a fair bit of 
re-factoring -- I'm thinking of a pretty easy way to do it now though -- 
hmmm.

> I would use client DCs for the first 
> category and a paint DC from the EVT_PAINT handler for the second.  But 
> if you shift your perspective a little you can see that there really 
> isn't any such thing as temporary drawing since you'll want to be able 
> to reproduce that same view from the EVT_PAINT handler in case the 
> window gets damaged and refreshed while you want that temporary drawing 
> to stay visible.

True -- now that I think about it, I have some kludges in now to deal 
with that...

> And for the "right now" stuff I found that "real soon" 
> was good enough and still quicker than my eye can detect any delay.

I can't tell either -- blitting is really, really fast!

> I'll try to come up with a sample showing the use of wx.Overlay...

That would be nice, though it sounds like I won't need it.

-Chris


-- 
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




More information about the wxpython-users mailing list