Re: Redrawing CALayer subclass when super layer is scaled
Re: Redrawing CALayer subclass when super layer is scaled
- Subject: Re: Redrawing CALayer subclass when super layer is scaled
- From: Rick Mann <email@hidden>
- Date: Wed, 9 Jul 2008 11:09:34 -0700
On Jul 9, 2008, at 09:56:36, David Duncan wrote:
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.
My CAD program has a number of "parts" laid out on the canvas at the
whim of the user. These parts are interconnected by the user with
lines comprised of a series of orthogonal line segments (it's
schematic capture CAD). There is one instance of my CALayer subclass
for each of these parts, and I'm thinking I'll use one for each
connected set of line segments (not sure yet).
Are you suggesting that each of these should subclass CATiledLayer
instead (or provide a delegate)? I was setting the transform on the
window's (root?) layer. Will that result in tile sublayers redrawing
their content?
I'll read the docs on CATiledLayer, and give this a shot. Thanks!
--
Rick
_______________________________________________
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