| Home 目次>ApplicationKit>NSBezierPath | |
bezierPath
新しくベジエパスオブジェクトを作って返します
+(NSBezierPath *) bezierPath
【返り値】 | |
| NSBezierPath * | ベジエパス |
【解説】
新しくベジエパスオブジェクト(NSBezierPath)を作って返します。
初期状態はカラで何も描かれていません。
【例文】
NSBezierPath *path = [NSBezierPath bezierPath];
///
//NSViewのサブクラス MyViewのDrawRectに上書き
-(void)drawRect:(NSRect)rect
{
NSBezierPath *thePath = [NSBezierPath bezierPath];
[thePath moveToPoint:NSMakePoint(20,20)];
[thePath lineToPoint:NSMakePoint(120,120)];
[[NSColor redColor] set];
[thePath stroke];
}
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSBezierPath | 修正日2006.12.26 |