Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

who's responsible for erasing?



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?

Thanks,
- Joe

--
,------------------------------------------------------------------.
| Joseph J. Strout REAL Software, Inc. |
| email@hidden http://www.realsoftware.com |
`------------------------------------------------------------------'
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



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.