Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 1. Graphics and Animations > Rotating Shapes Drawn on Graphic Contexts

1.14. Rotating Shapes Drawn on Graphic Contexts


Note:

I strongly suggest that you read the material in Section 1.12 and in Section 1.13 before proceeding with this section. To avoid redundancy of material, I have tried to keep material that has been taught in earlier sections out of later sections.


Just like scaling and translation, you can apply rotation translation to shapes drawn on paths, and graphics contexts. You can use the CGAffineTransformMakeRotation function and pass the rotation value in radians to get back a rotation transformation, of type CGAffineTransform. You can then apply this transformation to paths and shapes. If you want to rotate the whole context by a specific angle, you must use the CGContextRotateCTM procedure.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial