macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

removeAllPoints

INDEX>AppKit>NSBezier

ベジエパスから全ての点を削除します

Objective-C

- (void)removeAllPoints

Swift

func removeAllPoints()

解説

ベジエパスから全ての点を削除します。

返り値

なし

引数

なし

フレームワーク

ApplicationKit

クラス

NSBezierPath

使用可能

10.0

参照

関連記事(外部サイト)

例文

#import "MyView.h"

@implementation MyView

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

NSBezierPath *thePath = [NSBezierPath bezierPath];

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

[thePath appendBezierPath:[NSBezierPath bezierPathWithRect:NSMakeRect(50,50,150,100)]];

[thePath appendBezierPath:[NSBezierPath bezierPathWithRect:NSMakeRect(130,130,150,100)]];
[thePath removeAllPoints];
[[NSColor redColor] set];

[thePath stroke];


}

@end

更新時バージョン

10.10