Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shadows, m34 sublayer transforms, and rotation



Yes, this is a known bug with perspective transforms and filter/shadow effects,

	John


On Mar 24, 2008, at 1:11 PM, Neil Clayton wrote:

Hello.

I'm seeing an issue I don't understand.
If I add a layer, and a shadow - I see the shadow.

If I then rotate the layer:

[child setValue:[NSNumber numberWithFloat:-46] forKeyPath:@"transform.rotation.x"];
[child setValue:[NSNumber numberWithFloat:46] forKeyPath:@"transform.rotation.y"];


And then turn on some depth / perspective on it's superlayer like so:

- (IBAction) toggleDepth:(id)sender {
	CALayer *layer = workbench.workspaceLayer;
	CATransform3D trans = layer.sublayerTransform;
	float val = 420;
	trans.m34 = 1 / - val;
	layer.sublayerTransform = trans;
}

Then both the content of the layer, and it's shadow disappear.
I have made an example to show just this problem alone. Is this a known bug with CA, or am I doing something stupid? The example contains about 77 lines of code total.


http://downloads.shinywhitebox.com/CoreAnimShadow.zip

--
Regards,
Neil Clayton







_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartz-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartz-dev/email@hidden

This email sent to email@hidden
References: 
 >Shadows, m34 sublayer transforms, and rotation (From: Neil Clayton <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.