• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSView's DrawRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSView's DrawRect
      • From: "Erik M. Buck" <email@hidden>
    • Re: NSView's DrawRect
      • From: "Clark S. Cox III" <email@hidden>
  • Prev by Date: NSNotificationCenter and shared libraries
  • Next by Date: Re: Memory Mania Revisted
  • Previous by thread: Re: NSNotificationCenter and shared libraries
  • Next by thread: Re: NSView's DrawRect
  • Index(es):
    • Date
    • Thread