setCachesBezierPath:
解説
このオブジェクトは画像をキャッシュするかをセットします。
YESをセットするとキャッシュされます。
NOをセットするとされません。
フレームワーク
ApplicationKit
クラス
NSBezierPath
使用可能
10.0
参照
- cachesBezierPath
例文
#import "MyView.h" @implementation MyView //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]; [thePath1 setCachesBezierPath:YES]; } @end