Re: NSCopyBits and expose events
Re: NSCopyBits and expose events
- Subject: Re: NSCopyBits and expose events
- From: Allan Odgaard <email@hidden>
- Date: Sun, 30 Jun 2002 15:45:32 +0200
On sxndag, juni 30, 2002, at 12:28 , Paul Fox wrote:
[...] the bits which should have been copied, but couldnt be, will
result in ExposureEvents being sent to the client [...] NSCopyBits
[...] doesnt do automatic exposures for the uncovered regions.
All rendering happens in an off-screen buffer, so your window will never
be obscured by other windows, which is why there is no need to calculate
exposure events.
However, if the view scrolled contain sub-views, and these are partly
outside the visible area, then you would need to send a drawRect to
these views for the new portions -- but this calculation is rather
simple (the intersection of the new area with that of the child to be
redrawn, could be done using NSBezierPath) -- however, I don't really
understand what you're doing: if you scroll the contents of a view that
have childviews, then you'd need to adjust bound rectangles as well for
proper coordinate transformations, and surely you'd have it a lot easier
if you used NSClipView/NSScrollView.
For the records, there is (unfortunately?) no real speed gained by
rolling your own bitmap copy/scroll thing (I tested that ;-) ).
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.