Re: flipipng a CALayer from right to left
Re: flipipng a CALayer from right to left
- Subject: Re: flipipng a CALayer from right to left
- From: Gabriel Zachmann <email@hidden>
- Date: Wed, 15 Jun 2011 11:53:28 +0200
>
> Im trying to flip some CALayers, ones from left to right and another
> from right to left over the y axis.. So this is what Im doing to flip
> from left to right and the results is good.
>
> CATransform3D t = actual.transform;
> t.m11 = 0.5;
> actual.transform = t;
>
I'm not sure I understand your question correctly, but shouldn't that be
t.m11 = - t.m11;
t.m12 = - t.m12;
t.m13 = - t.m13;
?
After all, what you seem to try to do is to append a mirror operation to a chain of other transformations.
If this is what you're trying to do, you'll want to post-multiply the current transformation with a mirror matrix, i.e.
the matrix
(-1 )
( 1 )
( 1 )
which is what the three lines of code above are doing.
Hope this helps.
Gabriel.
____________________________________________________________
Die Zukunft war frueher auch besser.
( Karl Valentin )
____________________________________________________________
http://zach.in.tu-clausthal.de
____________________________________________________________
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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