Re: Redrawing CALayer subclass when super layer is scaled

2008-07-21 Thread David Duncan
On Jul 20, 2008, at 4:04 PM, Rick Mann wrote: David, I checked my code again, and realized I was setting the bias to 1 (I thought I saw that in a sample). I don't really understand how the numbers are interpreted, but when I set it higher (4, and then 10), my layers started getting redrawn

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Rick Mann
On Jul 20, 2008, at 22:57:12, Scott Anguish wrote: Nope. That is entirely private. The reason I had mentioned the animatable properties is because those visuals (including background color and the border) are not scaled the same as your content, since they aren't cached.. Okay, thanks f

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Scott Anguish
On 21-Jul-08, at 1:52 AM, Rick Mann wrote: On Jul 20, 2008, at 22:44:37, Scott Anguish wrote: all the visual properties that are 'animatable' are applied at render time. Thanks for that answer, Scott. So, can I not make my own drawing code an animatable property? I thought I could.

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Rick Mann
On Jul 20, 2008, at 22:44:37, Scott Anguish wrote: all the visual properties that are 'animatable' are applied at render time. Thanks for that answer, Scott. So, can I not make my own drawing code an animatable property? I thought I could. I was really hoping I would be able to do this

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Scott Anguish
On 21-Jul-08, at 1:20 AM, Rick Mann wrote: On Jul 16, 2008, at 16:23:23, David Duncan wrote: This is also why when you scale up a CALayer its content its content looks interpolated - its the same number of pixels as before, just interpolated larger. If you exceed the maximum LOD of a ti

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Rick Mann
On Jul 16, 2008, at 16:23:23, David Duncan wrote: This is also why when you scale up a CALayer its content its content looks interpolated - its the same number of pixels as before, just interpolated larger. If you exceed the maximum LOD of a tiled layer, you will see the same thing (which

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-20 Thread Rick Mann
On Jul 16, 2008, at 16:23:23, David Duncan wrote: Can't really say what you are or are not seeing here, I'd probably have to see code. If this is critical, I'd recommend filing a DTS incident. David, I checked my code again, and realized I was setting the bias to 1 (I thought I saw that

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-16 Thread Rick Mann
On Jul 16, 2008, at 16:23:23, David Duncan wrote: Can't really say what you are or are not seeing here, I'd probably have to see code. If this is critical, I'd recommend filing a DTS incident. I'm happy to send you my code. It's not critical, in that I can find other ways to do what I w

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-16 Thread David Duncan
On Jul 15, 2008, at 10:42 PM, Rick Mann wrote: However, at the time that my drawing code is called, the CGContextRef that's handed to me is NOT scaled. So my drawing is done small, and then only scaled afterward by some blit operation. The result is very pixilated lines. If you are dealin

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-15 Thread Rick Mann
On Jul 9, 2008, at 12:59:33, David Duncan wrote: A tiled layer will trigger redraws when it detects that higher (or lower) resolution content is available. It caches this drawing as well, so you won't get called to redraw just because of a resize of content at that level is already availab

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-09 Thread David Duncan
On Jul 9, 2008, at 2:08 PM, Rick Mann wrote: On Jul 9, 2008, at 12:59:33, David Duncan wrote: Given what it sounds like your content is, I might consider putting the whole canvas on a single or small set of tiled layers (they can be unbounded in size). Oh. I had thought making each indiv

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-09 Thread Rick Mann
On Jul 9, 2008, at 12:59:33, David Duncan wrote: Given what it sounds like your content is, I might consider putting the whole canvas on a single or small set of tiled layers (they can be unbounded in size). Oh. I had thought making each individual part its own CALayer was most appropri

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-09 Thread David Duncan
On Jul 9, 2008, at 11:09 AM, Rick Mann wrote: 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

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-09 Thread Rick Mann
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

Re: Redrawing CALayer subclass when super layer is scaled

2008-07-09 Thread David Duncan
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 cal

Redrawing CALayer subclass when super layer is scaled

2008-07-08 Thread Rick Mann
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