iphone - What is the best way to rotate a CGPoint on a grid? -


I rotate a CGP on the screen based on angles and the rotation will anchor at the other point. Wondering what is the most effective way to do this?

You can also use it:

Rotated Points = CGPPappLifeEfine Transforms (initial page, CGFine Transformmotorotation (angle)); Edit: To do rotation around a custom point, you should do as Adam described in his reply. CGAffineTransform should be used to look like this:
  CGFene transformer translatetransform = CGF TransformMake conversion (customcenter.x, customcenter.i); CGAffineTransform rotationTransform = CZF conversion transformations (angle); CGAffineTransform customRotation = CGFinTransformConcat (CGFene Transceconds Concrete (CGFFEIN Transform Inverted (Translator Transform), Rotation Transforms), Transform Transforms; Rotated Points = CGPintAppLifeFine Transforms (Initial Page, Customization);  

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -