• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: flipipng a CALayer from right to left
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Coalesced updates and refresh rate
  • Next by Date: Re: Coalesced updates and refresh rate
  • Previous by thread: flipipng a CALayer from right to left
  • Next by thread: Interface item validation through first responder
  • Index(es):
    • Date
    • Thread