| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Thanks mainly to Eric's persistence and patience, we finally have a custom control that can draw itself in response to its part of the window being invalidated.
However, it never erases, so (since it's drawing translucent content), we get just one layer of drawing on top of another. I've read over the documentation on kEventWindowUpdate and kEventDrawContent -- neither of which we're overriding at the moment (i.e., we use the standard handlers) -- and the docs don't say that either of these erase the invalidated region. That matches my observations.
But the docs on kEventControlDraw don't say that you should erase before drawing, nor does the sample code in the docs do so. And I don't think I would expect erasing at this point to work, in cases where you have overlapping or embedded controls.
So, I'm asking for a recommendation: at what point should I erase the invalidated area, so that the new content can be drawn on the correct background? Should I do this when I call InvalWindowRect? Or should I override
kEventWindowUpdate to get and erase the update region, before doing the rest of the drawing (in particular calling DrawControls)?
Or do my observations indicate that (again) something in our pane library is interfering with the normal behavior of these carbon > events?
| References: | |
| >who's responsible for erasing? (From: "Joseph J. Strout" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.