NSView's DrawRect
NSView's DrawRect
- Subject: NSView's DrawRect
- From: "Sven-S. Porst" <email@hidden>
- Date: Sun, 10 Feb 2002 17:42:46 +0100
I've made a subclass of NSView that draws a grid of blocks. In particular
I am converting the coordinates I receive from -drawRect to my 'block'
coordinates to determine which blocks need redrawing.
When I am moving the contents of a particular block to a different block
I call
-setNeedsDisplayInRect for the block it originates from and the
destination. Strangely when debugging or using the 'Quartz Debug'
application it seems that I am asked to redraw the whole rect spanned by
the two rects I passed to -setNeedsDisplayInRect. This seems a bit wasteful.
Why does this happen and how can I prevent it?
I guess, I could call my drawing method directly instead of using -
setNeedsDisplayInRect but so far my impression was that this isn't
considered the 'proper' way to do it.
Any comments or pointers for a better understanding of what's going on
are appreciated.
Cheers
Sven
--
Sven-S. Porst . PGP: 0x0085ABA3 .
http://homepage.mac.com/ssp
For any serious purpose, intelligence is a very minor gift.
-- G.H. Hardy, A Mathematician's Apology
_______________________________________________
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.