• 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
drawRect troubles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

drawRect troubles


  • Subject: drawRect troubles
  • From: Ivan Kourtev <email@hidden>
  • Date: Sat, 28 Oct 2006 23:05:18 -0400

When a custom view receives two drawRect's in succession with the same argument, can it be assumed that what was drawn the first time will still be there and displayed the next time around? This is all happening in the top app, in the top window, in the top view. The view receives drawRect because of stuff happening in the app and setNeedsDisplay:YES messages (not because the view was uncovered, etc.)

For performance reasons I am trying to do incremental drawing -- draw/ erase only small amounts of stuff that has changed -- but it seems that the view contents is "erased" between successive calls to drawRect. After each drawRect, I only see the incremental drawing -- the small stuff added/removed -- but not what was there before.

Am I doing something wrong, or is this expected behavior. If what I am seeing is expected behavior, does anyone have suggestions for how to achieve what I want?

Cheers,

--
ivan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: drawRect troubles
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: Stripping newlines/blanks when pasting on an NSTextField
  • Next by Date: Re: drawRect troubles
  • Previous by thread: Re: Stripping newlines/blanks when pasting on an NSTextField
  • Next by thread: Re: drawRect troubles
  • Index(es):
    • Date
    • Thread