1 #import <AppKit/NSAffineTransform.h>
2 #import <AppKit/NSBezierPath.h>
3 #import <ApplicationServices/ApplicationServices.h>
4 #import <AppKit/NSGraphicsContext.h>
6 @implementation NSAffineTransform(AppKit)
9 NSAffineTransformStruct atStruct=[self transformStruct];
10 CGAffineTransform cgMatrix;
12 cgMatrix.a=atStruct.m11;
13 cgMatrix.b=atStruct.m12;
14 cgMatrix.c=atStruct.m21;
15 cgMatrix.d=atStruct.m22;
16 cgMatrix.tx=atStruct.tX;
17 cgMatrix.ty=atStruct.tY;
19 CGContextConcatCTM([[NSGraphicsContext currentContext] graphicsPort],cgMatrix);
23 NSAffineTransformStruct atStruct=[self transformStruct];
24 CGAffineTransform cgMatrix;
26 cgMatrix.a=atStruct.m11;
27 cgMatrix.b=atStruct.m12;
28 cgMatrix.c=atStruct.m21;
29 cgMatrix.d=atStruct.m22;
30 cgMatrix.tx=atStruct.tX;
31 cgMatrix.ty=atStruct.tY;
33 CGContextSetCTM([[NSGraphicsContext currentContext] graphicsPort],cgMatrix);
36 -(NSBezierPath *)transformBezierPath:(NSBezierPath *)bezierPath {
37 NSBezierPath *result=[[bezierPath copy] autorelease];
39 [result transformUsingAffineTransform:self];