setFlatness:
解説
レシーバーの平坦さをセットします。
フレームワーク
ApplicationKit
クラス
NSBezierPath
使用可能
10.0
参照
- flatness
+ setDefaultFlatness:
関連記事(外部サイト)
例文
#import "MyView.h" @implementation MyView //NSViewのサブクラス MyViewのDrawRectに上書き -(void)drawRect:(NSRect)rect { NSBezierPath *thePath = [NSBezierPath bezierPath]; [NSBezierPath setDefaultLineJoinStyle:NSBevelLineJoinStyle]; [thePath moveToPoint:NSMakePoint(20,20)]; [thePath lineToPoint:NSMakePoint(120,120)]; [thePath lineToPoint:NSMakePoint(40,20)]; [thePath appendBezierPathWithRect:NSMakeRect(50,50,100,100)]; [thePath setFlatness:0.5]; [thePath setLineWidth:5]; [[NSColor redColor] set]; [thePath stroke]; NSLog([NSString stringWithFormat:@"%.1f",[thePath flatness]]); } @end
更新時バージョン
10.10