Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The <a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html" rel="nofollow">CGAffineTransform</a> data structure represents a matrix used for affine transformations. A transformation specifies how points in one coordinate system map to points in another coordinate system. An affine transformation is a special type of mapping that preserves parallel lines in a path but does not necessarily preserve lengths or angles. Scaling, rotation, and translation are the most commonly used manipulations supported by affine transforms, but skewing is also possible.</p> <p>Quartz provides functions that create, concatenate, and apply affine transformations using the CGAffineTransform data structure. For information on how to use affine transformation functions, see <a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001066" rel="nofollow">Quartz 2D Programming Guide</a>.</p> <p>You typically do not need to create an affine transform directly—<a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGContext/index.html#//apple_ref/doc/uid/TP30000950" rel="nofollow">CGContext Reference</a> describes functions that modify the current affine transform. If you don’t plan to reuse an affine transform, you may want to use <a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGContext/index.html#//apple_ref/c/func/CGContextScaleCTM" rel="nofollow">CGContextScaleCTM</a>, <a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGContext/index.html#//apple_ref/c/func/CGContextRotateCTM" rel="nofollow">CGContextRotateCTM</a>, <a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGContext/index.html#//apple_ref/c/func/CGContextTranslateCTM" rel="nofollow">CGContextTranslateCTM</a>, or <a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGContext/index.html#//apple_ref/c/func/CGContextConcatCTM" rel="nofollow">CGContextConcatCTM</a>.</p> <p><strong>Functions</strong></p> <p><strong>Creating an Affine Transformation Matrix</strong></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/macro/CGAffineTransformMake" rel="nofollow">CGAffineTransformMake</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformMakeRotation" rel="nofollow">CGAffineTransformMakeRotation</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformMakeScale" rel="nofollow">CGAffineTransformMakeScale</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformMakeTranslation" rel="nofollow">CGAffineTransformMakeTranslation</a></p> <p><strong>Modifying Affine Transformations</strong></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformTranslate" rel="nofollow">CGAffineTransformTranslate</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformScale" rel="nofollow">CGAffineTransformScale</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformRotate" rel="nofollow">CGAffineTransformRotate</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformInvert" rel="nofollow">CGAffineTransformInvert</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformConcat" rel="nofollow">CGAffineTransformConcat</a></p> <p><strong>Applying Affine Transformations</strong></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/macro/CGPointApplyAffineTransform" rel="nofollow">CGPointApplyAffineTransform</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/macro/CGSizeApplyAffineTransform" rel="nofollow">CGSizeApplyAffineTransform</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGRectApplyAffineTransform" rel="nofollow">CGRectApplyAffineTransform</a></p> <p><strong>Evaluating Affine Transforms</strong></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformIsIdentity" rel="nofollow">CGAffineTransformIsIdentity</a></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/func/CGAffineTransformEqualToTransform" rel="nofollow">CGAffineTransformEqualToTransform</a></p> <p><strong>Data Types</strong></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/c/tdef/CGAffineTransform" rel="nofollow">CGAffineTransform</a></p> <p><strong>Constants</strong></p> <p><a href="https://developer.apple.com/library/prerelease/ios/documentation/GraphicsImaging/Reference/CGAffineTransform/index.html#//apple_ref/doc/constant_group/CGAffineTransformIdentity" rel="nofollow">CGAffineTransformIdentity</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload