Re: CALayer wierdness

2009-02-12 Thread Brian Christensen
On Feb 12, 2009, at 21:23, David Blanton wrote: I set up a CALayer is shows in the iPhone Simulator does not show in the iPhone How can that be? I doubt anyone can answer your question without seeing relevant code snippets. /brian

Re: Newbie CALayer Questions

2008-07-20 Thread Brian Christensen
On Jul 20, 2008, at 20:00, Bob Barnes wrote: I have some questions related to CALayer drawing. I want to be able to display images, text, 2D graphics or a PDF page. I'm able to display an image by directly setting the contents property using a CGImageRef or subclassing CALayer,

Re: Core animation

2008-06-30 Thread Brian Christensen
Am Jun 30, 2008 um 07:04 schrieb Papa-Raboon: I was wondering if many of you have had a go at core animation yet? I am personally looking at making a piece of text fade in and fade out as a confirmation that something worked in my latest project. Currently I am just popping a bit of text

Re: Layer Backed Views and CoreAnimation neither animate nor stay in place

2008-06-27 Thread Brian Christensen
On Jun 27, 2008, at 08:56, Chilton Webb wrote: (3) Even when everything else is working right, the first time I perform my animation method, the animation does not work. Instead, it quickly swaps out the old view with the new one, and displays it in the foreground, on top of all other

Re: hitTest question

2008-06-20 Thread Brian Christensen
On Jun 20, 2008, at 2:50 , Eugen Belyakov wrote: I need to implement custom visual component system in OpenGL. And I want to use hitTest-like behavior ( with rotated frame rectangles and so on) to determine component under cursor. Could anyone with knowledge of how -hitTest works point me

Re: hitTest question

2008-06-20 Thread Brian Christensen
On Jun 20, 2008, at 4:04 , Brian Christensen wrote: for (Component *subcomponent in [hitComponent subcomponents]) Sorry, that line should be: for (Component *subcomponent in [match subcomponents]) { // ... } /brian smime.p7s Description: S/MIME cryptographic signature

Re: Problems with a Layer backed NSView in a NSScrollView

2008-06-19 Thread Brian Christensen
On Jun 19, 2008, at 5:14 , Gordon Apple wrote: I've tried a variety of things including regenerating the CALayers, but so far haven't been able to get the layers to scale to the coordinates of the underlying view. Again, I'll probably figure it out eventually, but this stuff just shouldn't

Re: CoreAnimation removeFromSuperlayer flicker

2008-06-16 Thread Brian Christensen
On Jun 14, 2008, at 2:29 , Milen Dzhumerov wrote: I've got a root layer which has got a solid background and I've got one sublayer. If I call removeFromSuperlayer on the sublayer when the root layer is small in size, it removes itself with animation and there are no problems. But if I

Re: Cocoa, C++, Keyboard input and Timers

2008-06-16 Thread Brian Christensen
On Jun 16, 2008, at 5:47 , Josh de Lioncourt wrote: Next, I need to be able to keep track of real-time during the game. In Windows, we'd use something like GetTickCount to accomplish this. Is there an equivalent on the Mac side? Again, pointing me in the right direction would be

Re: Cocoa, C++, Keyboard input and Timers

2008-06-16 Thread Brian Christensen
On Jun 16, 2008, at 6:43 , Brian Christensen wrote: (I do not know what the difference is, if any, between using mach_absolute_time() and UpTime().) Apparently, the answer is that there isn't really a difference: http://lists.apple.com/archives/perfoptimization-dev/2007/Oct/msg3.html

Re: CoreAnimation removeFromSuperlayer flicker

2008-06-14 Thread Brian Christensen
On Jun 14, 2008, at 10:28 , Milen Dzhumerov wrote: I've got a root layer which has got a solid background and I've got one sublayer. If I call removeFromSuperlayer on the sublayer when the root layer is small in size, it removes itself with animation and there are no problems. But if I

CALayer scale transform

2008-06-11 Thread Brian Christensen
Is it expected behavior that when applying a CATransform3DMakeScale() transform to a CALayer the layer's current bitmap information is what gets scaled (using some type of filter) rather than asking the layer to actually redraw itself into the, presumably, freshly transformed context?

Re: CALayer scale transform

2008-06-11 Thread Brian Christensen
On Jun 11, 2008, at 12:37 , David Duncan wrote: Effectively a CALayer represents a texture with the layer's contents on the video card. As the docs say, transforms only affect geometry. The texture does not include geometry, thus the current content is scaled rather than being re-rendered.

Re: Most efficient way to merge CA layers

2008-06-11 Thread Brian Christensen
On Jun 11, 2008, at 6:34 , Huibert Aalbers wrote: I am writing an app that uses multiple layers to display objects that move over a static background (which is drawn in its own layer). After the animation completes, I do no longer need all those layers and I guess that it would be more

Re: CATextLayer question

2008-06-05 Thread Brian Christensen
On Jun 5, 2008, at 9:04 , Davide Scheriani wrote: I was playing with my NSView and CATextLayer. I placed this code: -(void)mouseDown:(NSEvent *)theEvent { // [...snip...] [rootLayer addSublayer:textLayer]; } what ive noticed is when I click,the text appear with a fadein. Any

Re: CATextLayer question

2008-06-05 Thread Brian Christensen
On Jun 5, 2008, at 1:44 , Davide Scheriani wrote: nooo I dont believe it! :) I come from Flash and Core Animation is like Fuse Framework of Moses. Is a way to have some sort of collision method of one or more layers? I'm not quite sure what you're trying to say or accomplish, but if you

Re: CALayer subclass question

2008-06-04 Thread Brian Christensen
On Jun 4, 2008, at 11:19, Huibert Aalbers wrote: I am starting to work with Core Animation. I have tried to subclass CALayer but I am having problems because for some reason the drawInContext method never gets called, even though I invoke setNeedsDisplay on the layer. What is weird

Re: Leak when animating Core Animation Superlayer

2008-06-01 Thread Brian Christensen
On Jun 1, 2008, at 2:55 , Stéphane Droux wrote: When I run the program in Mallocdebug, it seems that one of the threads used by Core Animation to animate the layers doesn't release its memory. So it looks like a bug in Core Animation. However, since animating non-leaf layers is such a core

Re: Leak when animating Core Animation Superlayer

2008-06-01 Thread Brian Christensen
On Jun 1, 2008, at 5:03 , Stéphane Droux wrote: I've changed the timer function to do random animations and this time it really leaks: - (void) fromTimer: (NSTimer *) t { l2.frame = CGRectMake((double)random() / RAND_MAX*30, (double)random() / RAND_MAX*30, (double)random() /

Re: NSArray

2008-06-01 Thread Brian Christensen
On Jun 1, 2008, at 8:02 , Nathan wrote: here's my code: int x; - (IBAction)addNew:(id)sender { NSString *temp = @Enter Todo Item Here; [Items addObject: temp]; x=[Items count]; [label setIntValue: x]; [tableView setDataSource: Items]; [tableView

Re: Leak when animating Core Animation Superlayer

2008-05-31 Thread Brian Christensen
On May 31, 2008, at 16:39, Stéphane Droux [EMAIL PROTECTED] When I run the program in MallocDebug, the memory usage goes up every time the timer function is executed. If I change the animation to be on l2 instead of l1, or if I create l2 as a sublayer of mainLayer, the memory usage

Re: CATransactions not working

2008-05-19 Thread Brian Christensen
On May 19, 2008, at 1:06 , Adam Radestock wrote: It's in a function called from within the mouseDown: handler in my subclass. I just don't get why the implicit animation isn't working? A couple of things: 1) Make sure that somewhere up the hierarchy of your button's superviews one of

Re: CATransactions not working

2008-05-18 Thread Brian Christensen
On May 18, 2008, at 12:00 , Adam Radestock wrote: Hi everyone, I've been struggling to work out how to animate some properties on my NSButton subclass. I have looked through all the examples given in Apple's docs, but can't work out why my code doesn't animate. Where exactly are you

Re: NSView enterFullScreenMode:withOptions: woes; window levels

2008-03-17 Thread Brian Christensen
On Mar 17, 2008, at 4:51 , Sean McBride wrote: Hi all, Is anyone using the new NSView full screen methods in 10.5? I have a window which contains a 'group view', it is basically an NSView that contains two subviews: a button, and an custom NSView that draws pretty pictures. The button