Re: Final (cleanup) drawing event?
Re: Final (cleanup) drawing event?
- Subject: Re: Final (cleanup) drawing event?
- From: Clyde McQueen <email@hidden>
- Date: Fri, 8 Feb 2002 19:22:44 -0800
Thanks to all - yes, it in fact work!
/Clyde
On Friday, February 8, 2002, at 12:42 PM, email@hidden wrote:
I've got an NSView subclass with a rather expensive drawRect:
operation,
but there's a quicker, less accurate substitute that's good enough for
resizing the view. I'd like to have window/view resizing invoke the
quick version, but then go back after the mouse is up and perform the
final, slower draw. How can drawRect: distinguish between the zillions
of intermediate draws and the final draw?
From NSView's doc:
- (BOOL)inLiveResize
A convenience method, expected to be called from drawRect: to make
decisions about optimized drawing.
See Also: - viewDidEndLiveResize, - viewWillStartLiveResize
Now, it may be that the last drawRect: you get still is during the
live resize -- in fact, I'd expect this. In this case, you want to
listen for -viewDidEndLiveResize, and calls [self setNeedsDisplay:YES]
there to force one final redraw, which will be done at high quality.
Hope this helps... (boy, answering questions on this list is a good
way to learn more about Cocoa! I had no idea this API existed! :->)
Ben Haller
Stick Software
_______________________________________________
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.
_______________________________________________
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.