On Oct 27, 2007, at 11:59 AM, Andreas Falkenhahn wrote:
On 27.10.2007 at 11:36 John Stiles wrote:
Did you try setting the window's clip region to the same region you
returned to kEventWindowGetRegion?
Or passing this region to CopyBits as the maskRgn parameter?
I've never attempted either of these, just curious.
Oh, now that's brilliant. Calling SetClip() right before CopyBits()
seems
to do exactly what I want. I'll have to play with it some more to
see if
it does everything that I expect, but it seems very promising.
The maskRgn parameter is not very helpful because I'm also doing
lots of partial blits with CopyBits() and then I would have to crop
the clip region before every partial blit AFAICS. But calling
SetClip()
before CopyBits() seems to be fine.
Technically you could do your partial blits entirely via regions—i.e.
always pass the full rectangle, but for the maskRgn, pass the
intersection of the window region and the partial-blit rectangle. The
region APIs are actually very amenable to this sort of thing. But it
seems like SetClip already does what you want.
I'll try some more, and see if it's really a perfect solution. Sounds
almost to easy to be perfect, but who knows :-)
Anyways, big thanks for the hint. Hopefully this saves me a lot of
work...
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden