setWindingRule:
くりぬき規則をセットします
@property NSWindingRule windingRulevar windingRule: NSWindingRule
-(void)setWindingRule:(NSWindingRule)aWindingRule:
解説
図形をくりぬくか(WindingRule)をセットします
【NSWindingRule】
● NSNonZeroWindingRule 重なる塗りオブジェクトの向きが逆ならくりぬきます
● NSEvenOddWindingRule 重なる塗りオブジェクトの向きが同じならくりぬきます
フレームワーク
ApplicationKit
クラス
NSBezierPath
使用可能
10.0
参照
関連記事(外部サイト)
例文
//NSViewのサブクラス MyViewのDrawRectに上書き -(void)drawRect:(NSRect)rect { NSBezierPath *thePath1 = [NSBezierPath bezierPath]; [thePath1 setWindingRule:NSEvenOddWindingRule]; [thePath1 moveToPoint:NSMakePoint(20,20)]; [thePath1 appendBezierPathWithOvalInRect:NSMakeRect(50,50,100,100)]; [thePath1 appendBezierPathWithOvalInRect:NSMakeRect(20,20,80,80)]; [[NSColor redColor] set]; [thePath1 fill]; }
更新時バージョン
10.10