| Home 目次>ApplicationKit>NSBezierPath | |
defaultLineWidth
デフォルトのライン幅をポイントで返します
+(float) defaultLineWidth
【返り値】 | |
| float | 浮動小数点値 |
【解説】
デフォルトのライン幅をポイントで返します。
デフォルトのライン幅は、1.0です。
【例文】
#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 defaultLineWidth]]);
}
@end
![]() | |
この記事を評価してください。
| Home 目次>ApplicationKit>NSBezierPath | 修正日2006.12.26 |