setLineCapStyle:
ベジエパスのラインキャップスタイルをセットします
@property NSLineCapStyle lineCapStylevar lineCapStyle: NSLineCapStyle
解説
ベジエパスのラインキャップスタイルをセットします
● NSButtLineCapStyle すぱっと切れた端
● NSRoundLineCapStyle 丸い端
● NSSquareLineCapStyle 四角い端
フレームワーク
ApplicationKit
クラス
NSBezierPath
使用可能
10.1
関連記事(外部サイト)
例文
//NSViewのサブクラス MyViewのDrawRectに上書き -(void)drawRect:(NSRect)rect { NSBezierPath *thePath = [NSBezierPath bezierPath]; [thePath setLineCapStyle:NSRoundLineCapStyle]; [thePath moveToPoint:NSMakePoint(20,20)]; [thePath lineToPoint:NSMakePoint(120,120)]; [thePath appendBezierPathWithRect:NSMakeRect(50,50,100,100)]; [thePath setLineWidth:5]; [[NSColor redColor] set]; [thePath stroke]; }
更新時バージョン
10.10