5 // Created by Hori,Masaki on 2017/03/01.
6 // Copyright © 2017年 Hori,Masaki. All rights reserved.
11 func polygon(_ point: () -> [NSPoint]) -> NSBezierPath? {
13 let count = points.count
14 guard count > 2 else { return nil }
15 let path = NSBezierPath()
16 path.move(to: points[0])
17 points[1..<count].forEach { path.line(to: $0) }
22 func polyline(_ point: () -> [NSPoint]) -> NSBezierPath? {
24 let count = points.count
25 guard count > 1 else { return nil }
26 let path = NSBezierPath()
27 path.move(to: points[0])
28 points[1..<count].forEach { path.line(to: $0) }
32 func multiline(_ lines: () -> [(NSPoint, NSPoint)]) -> NSBezierPath? {
33 let path = NSBezierPath()