• 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
Re: Final (cleanup) drawing event?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Final (cleanup) drawing event?


  • Subject: Re: Final (cleanup) drawing event?
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Fri, 8 Feb 2002 17:52:23 -0200

>Date: Fri, 8 Feb 2002 06:51:22 -0800
>From: Clyde McQueen <email@hidden>
>
>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?

I haven't done this myself, but I'd put in a BOOL instance variable in your NSView subclass, and a method to set/clear it.

Set it when receiving the notification that the window's about to be resized (windowWillResize:toSize:), clear it when the resize is finished (windowDidResize:). Test it inside your drawRect:.

HTH,
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"I love deadlines. I love the whooshing noise they make as they go by" (Douglas Adams)
http://www.brockerhoff.net/ (updated Feb. 2002)
_______________________________________________
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: Final (cleanup) drawing event?
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: NSURL question
  • Next by Date: Re: Final (cleanup) drawing event?
  • Previous by thread: Final (cleanup) drawing event?
  • Next by thread: Re: Final (cleanup) drawing event?
  • Index(es):
    • Date
    • Thread