mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 20:19:40 +00:00
a73db3310f
- new experimental AppKit-MacOS-i386 target which sits on Apple's Foundation, ApplicationServices (not operational). Header&api usage fixes to clean this up. - Redid NSBezierPath so it doesn't rely on private Cocotron CoreGraphics API. - Change the NSRaise macros/functions to be inline so AppKit can just include it instead of depending on them in Foundation since they aren't present in OSX. - split NSRaiseException() into it's own Foundation private header and removed use from AppKit. - changed use of NSRangeEntries so AppKit can embed it on MacOS - switched NSOutlineView use of NSInt*CallBacks to NSInteger*CallBacks - added CGPDFContext and CGDataConsumer
45 lines
1.1 KiB
Objective-C
45 lines
1.1 KiB
Objective-C
#import <AppKit/NSAffineTransform.h>
|
|
#import <AppKit/NSBezierPath.h>
|
|
#import <ApplicationServices/ApplicationServices.h>
|
|
#import <AppKit/NSGraphicsContext.h>
|
|
|
|
@implementation NSAffineTransform(AppKit)
|
|
|
|
-(void)concat {
|
|
NSAffineTransformStruct atStruct=[self transformStruct];
|
|
CGAffineTransform cgMatrix;
|
|
|
|
cgMatrix.a=atStruct.m11;
|
|
cgMatrix.b=atStruct.m12;
|
|
cgMatrix.c=atStruct.m21;
|
|
cgMatrix.d=atStruct.m22;
|
|
cgMatrix.tx=atStruct.tX;
|
|
cgMatrix.ty=atStruct.tY;
|
|
|
|
CGContextConcatCTM([[NSGraphicsContext currentContext] graphicsPort],cgMatrix);
|
|
}
|
|
|
|
-(void)set {
|
|
NSAffineTransformStruct atStruct=[self transformStruct];
|
|
CGAffineTransform cgMatrix;
|
|
|
|
cgMatrix.a=atStruct.m11;
|
|
cgMatrix.b=atStruct.m12;
|
|
cgMatrix.c=atStruct.m21;
|
|
cgMatrix.d=atStruct.m22;
|
|
cgMatrix.tx=atStruct.tX;
|
|
cgMatrix.ty=atStruct.tY;
|
|
|
|
CGContextSetCTM([[NSGraphicsContext currentContext] graphicsPort],cgMatrix);
|
|
}
|
|
|
|
-(NSBezierPath *)transformBezierPath:(NSBezierPath *)bezierPath {
|
|
NSBezierPath *result=[[bezierPath copy] autorelease];
|
|
|
|
[result transformUsingAffineTransform:self];
|
|
|
|
return result;
|
|
}
|
|
|
|
@end
|