---
title: CGAffineTransform
framework: coregraphics
role: collectionGroup
role_heading: API Collection
path: coregraphics/cgaffinetransform
---

# CGAffineTransform

An affine transformation matrix for use in drawing 2D graphics.

## Overview

Overview 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. For more information on how to create, concatenate, and apply affine transformations, see Quartz 2D Programming Guide. You typically do not need to create an affine transform directly—CGContext describes functions that modify the current affine transform. If you don’t plan to reuse an affine transform, you may want to use scaleBy(x:y:), rotate(by:), translateBy(x:y:), or concatenate(_:).

## Topics

### Creating an Affine Transformation Matrix

- [CGAffineTransformMake(_:_:_:_:_:_:)](coregraphics/cgaffinetransformmake(_:_:_:_:_:_:).md)
- [CGAffineTransformMakeRotation(_:)](coregraphics/cgaffinetransformmakerotation(_:).md)
- [CGAffineTransformMakeScale(_:_:)](coregraphics/cgaffinetransformmakescale(_:_:).md)
- [CGAffineTransformMakeTranslation(_:_:)](coregraphics/cgaffinetransformmaketranslation(_:_:).md)

### Modifying Affine Transformations

- [CGAffineTransformTranslate(_:_:_:)](coregraphics/cgaffinetransformtranslate(_:_:_:).md)
- [CGAffineTransformScale(_:_:_:)](coregraphics/cgaffinetransformscale(_:_:_:).md)
- [CGAffineTransformRotate(_:_:)](coregraphics/cgaffinetransformrotate(_:_:).md)
- [CGAffineTransformInvert(_:)](coregraphics/cgaffinetransforminvert(_:).md)
- [CGAffineTransformConcat(_:_:)](coregraphics/cgaffinetransformconcat(_:_:).md)

### Applying Affine Transformations

- [CGPointApplyAffineTransform(_:_:)](coregraphics/cgpointapplyaffinetransform(_:_:).md)
- [CGSizeApplyAffineTransform(_:_:)](coregraphics/cgsizeapplyaffinetransform(_:_:).md)
- [CGRectApplyAffineTransform(_:_:)](coregraphics/cgrectapplyaffinetransform(_:_:).md)

### Evaluating Affine Transforms

- [CGAffineTransformIsIdentity(_:)](coregraphics/cgaffinetransformisidentity(_:).md)
- [CGAffineTransformEqualToTransform(_:_:)](coregraphics/cgaffinetransformequaltotransform(_:_:).md)

### Data Types

- [CGAffineTransform](corefoundation/cgaffinetransform.md)

### Constants

- [CGAffineTransformIdentity](coregraphics/cgaffinetransformidentity.md)

## See Also

### Related Documentation

- [Quartz 2D Programming Guide](apple-archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction.md)
