• 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: Text Animation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text Animation


  • Subject: Re: Text Animation
  • From: "John C. Randolph" <email@hidden>
  • Date: Sun, 2 Sep 2007 20:48:19 -0700


On Sep 1, 2007, at 3:48 PM, Scott Anguish wrote:


On Sep 1, 2007, at 6:38 AM, Uli Kusterer wrote:

There are only a few places where you're ever allowed to draw in Cocoa: Either between a lockFocus/unlockFocus on an NSImage/ NSImageRep, or from inside the drawRect method of an NSView subclass (that's pure Cocoa, i.e. AppKit -- if you use OpenGL directly or CoreImage or so, there may be other places). You're not supposed to lock focus on a view manually and draw just at any old time.

that's probably a bit strong.

there are cases where locking focus, drawing, and then unlocking focus outside of these cases are useful (in the AppKit domain) . I believe at least one common case is creating selection rectangles/ indicators.

I will point out though, that drawing selection indicators can be done without going outside of the normal view update machinery.


http://developer.apple.com/samplecode/Cropped_Image/index.html

-jcr


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Text Animation (From: Uli Kusterer <email@hidden>)
 >Re: Text Animation (From: Scott Anguish <email@hidden>)

  • Prev by Date: programmatically free memory
  • Next by Date: Adding to an applications menu.
  • Previous by thread: Re: Text Animation
  • Next by thread: Re: Text Animation
  • Index(es):
    • Date
    • Thread