NSAffineTransform Additions Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AppKit.framework |
| Companion guide | |
| Declared in | NSAffineTransform.h |
Overview
The Application Kit extends Foundation’s NSAffineTransform class by adding:
Methods for applying affine transformations to the current graphics context.
A method for applying an affine transformation to an
NSBezierPath.
Instance Methods
concat
Appends the receiver’s matrix to the current transformation matrix stored in the current graphics context, replacing the current transformation matrix with the result.
Discussion
Concatenation is performed by matrix multiplication—see “Manipulating Transform Values”.
If this method is invoked from within an NSView drawRect: method, then the current transformation matrix is an accumulation of the screen, window, and any superview’s transformation matrices. Invoking this method defines a new user coordinate system whose coordinates are mapped into the former coordinate system according to the receiver’s transformation matrix. To undo the concatenation, you must invert the receiver’s matrix and invoke this method again.
Availability
- Available in OS X v10.0 and later.
Declared In
NSAffineTransform.hset
Sets the current transformation matrix to the receiver’s transformation matrix.
Discussion
The current transformation is stored in the current graphics context and is applied to subsequent drawing operations. You should use this method sparingly because it removes the existing transformation matrix, which is an accumulation of transformation matrices for the screen, window, and any superviews. Instead use the concat method to add this transformation matrix to the current transformation matrix.
Availability
- Available in OS X v10.0 and later.
Declared In
NSAffineTransform.htransformBezierPath:
Creates and returns a new NSBezierPath object with each point in the given path transformed by the receiver.
Parameters
- aPath
An object representing the bezier path to be used in the transformation.
Discussion
The original NSBezierPath object is not modified.
Availability
- Available in OS X v10.0 and later.
See Also
-
- transformPoint:transformSize:
Declared In
NSAffineTransform.h© 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-02-28)