Name
NSAffineTransform — Mac OS X 10.0
Synopsis
This class is used to perform affine transform operations on
NSBezierPath
objects, as well as on
NSSize
, and NSPoint
structures.
An affine transform is an operation in which one
coordinate system is mapped to another whereby the parallelism of
lines is maintained, but not necessarily their length or angles.
NSAffineTransform
has methods for performing
several types of operations: rotation, scaling, and translation.
These transforms are implemented in the methods
scaleBy
:, scaleXBy:yBy
:,
rotateByDegrees
:,
rotateByRadians
:, and
translateXBy:yBy
:. Additionally, applications may
define their own transformation matrices using the method
setTransformStruct
:. To apply a transform to an
object we use transformBezierPath
:,
transformSize
:, and
transformPoint
:.
|
@interface NSAffineTransform : NSObject <NSCoding, NSCopying>
|
// Initializers
|
- (id)initWithTransform:(NSAffineTransform *)transform; |
// Accessor Methods
|
- (void)setTransformStruct:(NSAffineTransformStruct)transformStruct; |
- (NSAffineTransformStruct)transformStruct;
|
// Class Methods
|
+ (NSAffineTransform *)transform;
|
// Instance Methods
|
- (void)invert;
|
- (void)concat;
|
- (void)set;
|
- (void)appendTransform:(NSAffineTransform *)transform; |
- (void)prependTransform:(NSAffineTransform *)transform; |
- (void)rotateByDegrees:(float)angle; |
- (void)rotateByRadians ... |
Get Cocoa in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.