Re: Flipping coordinate system of a CALayer

2010-07-21 Thread Oleg Krupnov
Responding to myself, as I promised. I have found a fatal problem with my approach on Leopard. The layers begin to appear in weird places, sometimes they disappear at all. As it turns out, -setPosition: is called with wrong values (probably assuming a different anchorPoint) and -setBounds: is calle

[moderator] Re: Flipping coordinate system of a CALayer

2010-07-16 Thread Scott Anguish
On Jul 16, 2010, at 2:20 AM, Dave Keck wrote: >>> The only workaround I was able to get working was to call a private >>> AppKit method to fix up the layer geometry. >> >> Which is a no-no, and shouldn’t be done. Bad Kyle. No biscuit. > > Forgive me for raising such a taboo topic, Yes, correct

Re: Flipping coordinate system of a CALayer

2010-07-16 Thread Oleg Krupnov
Further investigation has shown that when the custom layer-hosting view is placed in the parent layer-backed container view, the parent view internally discards the flipping transform of the child view's root layer on each call to its -setFrame (which can be quite often). I have cured this problem

Re: Flipping coordinate system of a CALayer

2010-07-15 Thread Dave Keck
>> The only workaround I was able to get working was to call a private >> AppKit method to fix up the layer geometry. > > Which is a no-no, and shouldn’t be done. Bad Kyle. No biscuit. Forgive me for raising such a taboo topic, but I've encountered situations where I had to choose between A) using

Re: Flipping coordinate system of a CALayer

2010-07-15 Thread Scott Anguish
On Jul 15, 2010, at 1:24 PM, Kyle Sluder wrote: > On Thu, Jul 15, 2010 at 9:18 AM, Oleg Krupnov wrote: >> Is this a bug? And how to work around it? > > There are lots of bugs with flipped layer-hosting views inside of > layer-backed views.. See this thread: > http://lists.apple.com/archives/coc

Re: Flipping coordinate system of a CALayer

2010-07-15 Thread Kyle Sluder
On Thu, Jul 15, 2010 at 9:18 AM, Oleg Krupnov wrote: > Is this a bug? And how to work around it? There are lots of bugs with flipped layer-hosting views inside of layer-backed views.. See this thread: http://lists.apple.com/archives/cocoa-dev/2010/May/msg00988.html The only workaround I was able

Flipping coordinate system of a CALayer

2010-07-15 Thread Oleg Krupnov
Hi, In a layer-hosting custom view, I'm flipping the root layer coordinate system with the following code: CGAffineTransform flipTransform; flipTransform.a = 1.0; flipTransform.b = 0.0; flipTransform.c = 0.0; flipTransform.d = -1.0; flipTransform.tx = 0.0; flipTransform.ty = 0.0; [rootLayer setAf