• 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: Redrawing CALayer subclass when super layer is scaled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redrawing CALayer subclass when super layer is scaled


  • Subject: Re: Redrawing CALayer subclass when super layer is scaled
  • From: David Duncan <email@hidden>
  • Date: Wed, 9 Jul 2008 09:56:36 -0700

On Jul 8, 2008, at 10:53 PM, Rick Mann wrote:

I'm trying to use scaling of the superlayer to implement a zoom feature in my CAD app. The various elements in the canvas are drawn by a CALayer subclass I have, which overrides drawInContext:. After the zoom finishes animating, I want CA to call all the sublayer's drawInContext: methods as necessary to re-render the layer's contents. Is there any way to do this, short of keeping track of all the layers myself and calling setNeedsDisplay on them?


Your best solution for rendering multi-representational content in Core Animation is to use a CATiledLayer. It will automatically be called to update content as you zoom in and out (assuming you specify that the level of content exists). The drawing model is exactly the same as with a CALayer, although you can optimize the drawing a bit with a bit more knowledge.
--
David Duncan
Apple DTS Animation and Printing
email@hidden




_______________________________________________

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


  • Follow-Ups:
    • Re: Redrawing CALayer subclass when super layer is scaled
      • From: Rick Mann <email@hidden>
References: 
 >Redrawing CALayer subclass when super layer is scaled (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Deploying application with Growl support
  • Next by Date: Re: Overriding v alueForKeyPath
  • Previous by thread: Redrawing CALayer subclass when super layer is scaled
  • Next by thread: Re: Redrawing CALayer subclass when super layer is scaled
  • Index(es):
    • Date
    • Thread