NSCell and partial redraw
NSCell and partial redraw
- Subject: NSCell and partial redraw
- From: Patrick Mau <email@hidden>
- Date: Tue, 31 Aug 2010 11:59:36 +0200
Hallo everyone
Let's assume I have a custom NSView that will use to custom NSCell instances to render its contents.
Now, if "drawRect:" is called on the NSView, I get the dirty rect that needs to be redrawn.
The NSCell class on the other hands uses:
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
Where "cellFrame" is the complete frame the NSCell should use to draw itself into.
Should I intersect the dirty region of the NSView and somehow add additional
functionality to the NSCell to maintain the dirty region?
Or should I ask the "controlView" for the region and maintain it there?
How do people implement NSCell subclasses when the goal is to minimize
the redraw code needed when the cell is drawn?
Thanks a lot
Patrick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden