| Home 目次>ApplicationKit>NSBezierPath | |
appendBezierPathWithOvalInRect:
楕円形のパスを追加します
-(void) appendBezierPathWithOvalInRect:(NSRect)aRect
【返り値】 | |
| void | なし |
| 【パラメータ】 | |
| aRect | 追加する楕円形のパスの範囲 |
【解説】
楕円形のパスを追加します。
追加する楕円形の領域はaRectで指定します。
aRectが正方形なら、円になります。
楕円形のパスは上の中心から始まって反時計回りに描かれます。
【例文】
//NSViewのサブクラス MyViewのDrawRectに上書き
-(void)drawRect:(NSRect)rect
{
NSBezierPath *thePath = [NSBezierPath bezierPath];
[thePath moveToPoint:NSMakePoint(20,20)];
[thePath lineToPoint:NSMakePoint(120,120)];
[thePath appendBezierPathWithOvalInRect:NSMakeRect(50,50,100,100)];
[[NSColor redColor] set];
[thePath stroke];
}
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSBezierPath | 修正日2006.12.26 |