CIFilter on CALayer on Mac OS 10.7+
CIFilter on CALayer on Mac OS 10.7+
- Subject: CIFilter on CALayer on Mac OS 10.7+
- From: Thibault Martin-Lagardette <email@hidden>
- Date: Thu, 04 Oct 2012 18:18:34 +0000
- Thread-topic: CIFilter on CALayer on Mac OS 10.7+
Hi,
I would like to make sure I understand what has been happening in some part of our application.
The code is really easy. The idea is to "flash" an NSButton.
The NSButton subclass sets its properties to selected, draws itself into a NSBitmapImageRep, resets its selected property, and create a CIImage (out of the bitmap rep), that is set to as the inputTargetImage of a CIDissolveTransition filter applied to its CALayer.
The expected result is that the button will "flash" by having some sort of animation between its normal and selected state.
The animation is added to the layer through [self.layer setFilters:...] and [self.layer addAnimation:forKey:].
This worked really well when building with the 10.6 SDK, and running on a 10.8 machine.
However, when building with the 10.7 or 10.8 SDK, the animation behaves differently.
Not only is the resulting image (the inputTargetImage) a few pixels off on the y-axis, and on retina displays, the image is drawn twice as big.
Obviously, there has been a lot of changes on CALayer starting Lion, but I'm not quite sure what has changed so much, nor how I can fix this. Any idea?
Thanks!
--
Thibault Martin-Lagardette
_______________________________________________
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