Re: CAShapeLayer for Drawing Lines; Animations Skewed

2009-09-10 Thread John Harper
On Sep 10, 2009, at 7:20 PM, Christopher J Kemsley wrote: CAShapeLayer with Path from PointA to PointB In this method, I used a CAShapeLayer with the correct color and a 1px width. I made a path between the two points. For moves, I created another path representing the new position and

Re: CGRectUnion with one empty Rectangle

2009-05-20 Thread John Harper
CGRectZero is the rectangle at point (0, 0) with zero size. For an empty rectangle that will work correctly with CGRectUnion you need to use CGRectNull instead. John On May 20, 2009, at 11:45 AM, Gordon Apple wrote: IMHO, if it works the way you describe, it's doing the right

Re: [CA] zPosition + mask + animation = no animation

2009-03-13 Thread John Harper
Hi, This sounds like a framework bug. Please file a bug report so we can make sure it gets fixed (if possible including a test case showing the issue). thanks, John On Mar 13, 2009, at 3:49 AM, Paul Arthur Henrion wrote: Hi list's readers, I'm encountering a weird issue by

Re: Simple Flipbook Animation?

2008-10-31 Thread John Harper
Hi, I described how to do this using a CAKeyframeAnimation in a previous thread: http://www.cocoabuilder.com/archive/message/cocoa/2008/8/3/214715 John On Oct 31, 2008, at 9:51 AM, Jeshua Lacock wrote: Hello, I think I must be missing something obvious. I have looked over all

Re: Drawing CATextLayer into a CGImageRef?

2008-10-09 Thread John Harper
Hi, the best way to address this kind of thing is by drawing the shadow into the layer bitmap. You can do that by subclassing CATextLayer and adding a drawInContext: method something like: - (void)drawInContext:(CGContextRef)ctx { CGContextSetShadow (ctx, CGSizeMake (0, -4), 2);

Re: Path animation with CGPathAddArcToPoint

2008-09-02 Thread John Harper
On Sep 2, 2008, at 10:30 AM, Gordon Hughes wrote: I guess I had gotten lucky with a previous path animation attempt (a MoveToPoint and EllipseInRect) when I used the paced calculation mode because it worked. According to the CAKeyframeAnimation Class Reference, although it's available in OS X

Re: Path animation with CGPathAddArcToPoint

2008-09-02 Thread John Harper
On Sep 2, 2008, at 12:41 PM, Gordon Hughes wrote: Thanks for your reply. I'll submit the radar later today. I'm still curious about elliptical paths and 360 degree arcs. Do they always start/end on horizontals, or is there something that I'm overlooking to have the path start at an

Re: Faster alternative to NSImage draw/composite?

2008-08-02 Thread John Harper
Hi, If you have a fixed set of images you're repeatedly flipping through you can have CoreAnimation do the animation for you, something like this: CAKeyframeAnimation *anim; NSMutableArray *images; CGImageRef im; int i; images = [NSMutableArray array];

Re: CA: Are nested 3D transforms supported?

2008-07-22 Thread John Harper
On Jul 22, 2008, at 3:07 PM, Jens Alfke wrote: When I implement this, I get the wrong results. It looks like the pieces do get rotated, but then they're projected flat onto the board layer, so when the board tilts back it's clear that it's still flat but with distorted pieces drawn on it.

Re: CALayer scale transform

2008-06-11 Thread John Harper
On Jun 11, 2008, at 12:39 PM, Jens Alfke wrote: Are all layers treated as bitmap textures, even solid ones? For instance, if I create a 1024x1024 layer as a background and just set its background color to blue, does that allocate a megapixel's worth of VRAM? What about if I add a border

Re: Leak when animating Core Animation Superlayer

2008-06-01 Thread John Harper
Hi, if you think you've found a memory leak inside of CoreAnimation, please file a radar (bugreporter.apple.com) with a project showing the leak, and we'll look into it. thanks, John On Jun 1, 2008, at 10:58 AM, Stéphane Droux wrote: On Sun, Jun 1, 2008 at 6:31 PM, Brian

Re: Core Animation Flickering

2008-04-25 Thread John Harper
On Apr 25, 2008, at 1:20 AM, Colin Cornaby wrote: I have a CALayer subclass, set to redraw on bounds change, with the following draw code (I don't expect it to be meaningful, but I'm pasting it here for the sake of completeness.) … It's parent view is set up to change the layers frame to

Re: Core Animation Deadlock

2008-04-24 Thread John Harper
On Apr 24, 2008, at 7:38 PM, Colin Cornaby wrote: It looks like NSUIHeartBeat could be attempting to lock something. Although I could be wrong, it may not be related. The render thread got stuck while depth sorting: Thread 11 (process 13823 thread 0x8803): #0 0x90a27d9c in

Re: CAOpenGLLayer

2008-03-30 Thread John Harper
Hi, On Mar 29, 2008, at 9:01 AM, Stefan Hafeneger wrote: I would like to use CAOpenGLLayer instead of NSOpenGLView. I didn't find any example source code but got it working. I implemented … The API documentation says that the viewport is already set to bounds size before

Re: CATiledLayer tile invalidation

2008-03-24 Thread John Harper
No, there's no way to do that right now, CATiledLayer doesn't even know when tiles are evicted from the cache. Probably the best thing to do is to give your cache a maximum size and remove items after they've been idle for some time… John On Mar 24, 2008, at 8:39 AM, Dmitry

Re: CoreAnimation: rendering error 500

2008-03-14 Thread John Harper
It means that CA is detecting an OpenGL error while rendering, there's not much you can do to debug it unfortunately. The best thing would be to file a radar with a sample app showing the issue, thanks, John On Mar 14, 2008, at 4:32 AM, Pierre Bernard wrote: Hi! I have just