invert
Index>Foundation>NSAffineTransform
座標系を反転します
解説
座標系を反転します。
(NSAffineTransformクラス、10.3までのAppKitから10.4からFoundationに変更)
返り値
( void )
なし
引数
フレームワーク
Foundation
クラス
NSAffineTransform
Instance Methods
使用可能
10.0
参照
例文
#import "MyView.h" @implementation MyView -(void)drawRect:(NSRect)rect { NSBezierPath *thePath1 = [NSBezierPath bezierPath]; NSAffineTransform *affin = [NSAffineTransform transform]; [thePath1 setWindingRule:NSEvenOddWindingRule]; [thePath1 moveToPoint:NSMakePoint(20,20)]; [thePath1 appendBezierPathWithOvalInRect:NSMakeRect(50,50,100,100)]; [thePath1 appendBezierPathWithOvalInRect:NSMakeRect(20,20,80,80)]; [[NSColor blueColor] set]; [thePath1 fill]; [affin translateXBy: 10.0 yBy: 10.0]; [affin invert]; [thePath1 transformUsingAffineTransform: affin]; [[NSColor redColor] set]; [thePath1 fill]; } @end