setUpGState
GStateが作られる時に呼び出されます
解説
GStateが作られる時に呼び出されます。
サブクラスでオーバーライドします。
NSViewでは何もしません。
返り値
( void )
なし
引数
フレームワーク
ApplicationKit
クラス
NSView
Instance Methods
使用可能
10.0
参照
- allocateGState
- renewGState
例文
#import "MyImageView.h" @implementation MyImageView -(void)setUpGState { NSBezierPath *thePath = [NSBezierPath bezierPath]; [thePath moveToPoint:NSMakePoint(20,20)]; [thePath lineToPoint:NSMakePoint(120,120)]; [thePath appendBezierPath:[NSBezierPath bezierPathWithOvalInRect:NSMakeRect(50,50,150,100)]]; [[NSColor redColor] set]; [thePath stroke]; NSLog(@"!setUpGState!"); [super setUpGState]; } @end