NSBezierPath:defaultFlatness
Home 目次>ApplicationKit>NSBezierPath

defaultFlatness

現在のグラフィックスコンテキストの平坦さ属性を返します


+(float) defaultFlatness


【返り値】
   float浮動小数点値


【解説】

現在のグラフィックスコンテキストの平坦さ属性を返します。
平坦さ属性は、カーブが描かれる精度(またはなめらかさ)。
初期設定の平坦さ値は、0.6です。



【例文】


#import "MyView.h"

@implementation MyView

//NSViewのサブクラス MyViewのDrawRectに上書き
-(void)drawRect:(NSRect)rect
{

NSBezierPath *thePath = [NSBezierPath bezierPath];

[NSBezierPath setDefaultLineJoinStyle:NSBevelLineJoinStyle];

[thePath moveToPoint:NSMakePoint(20,20)];
[thePath lineToPoint:NSMakePoint(120,120)];
[thePath lineToPoint:NSMakePoint(40,20)];


[thePath appendBezierPathWithRect:NSMakeRect(50,50,100,100)];

[thePath setLineWidth:5];
[[NSColor redColor] set];

[thePath stroke];
NSLog([NSString stringWithFormat:@"%.1f",[NSBezierPath defaultFlatness]]);

}

@end


(C) 2000-2007 Satoshi Oomori.
[Apple]

Google
Webwww.oomori.com
Apple_Store_40x120

[ad:Usual day in Japan]

この記事を評価してください。 

良い 

間違いがある 説明がわかりにくい 例文がわかりにくい  

Home 目次>ApplicationKit>NSBezierPath
修正日2006.12.26