Posts

Post not yet marked as solved
2 Replies
I am using swift 4 version and below is the code for line using the nsbezierpath.private let StartPoint: CGPoint override var actionName: String { return Copy("renderable.type.Singal") } required init(center: CGPoint) { // self.startpoint1 = center self.StartPoint = center let newPath = NSBezierPath() // newPath.move(to: StartPoint) super.init(path: newPath) lineWidth = 3 } override func mouseMoved(to point: CGPoint) { super.mouseMoved(to: point) let newPath1 = NSBezierPath() newPath1.move(to: self.StartPoint) newPath1.line(to: point) path = newPath1 }Store this methods to my chlid class and setting the chlid class objecte to the parentclass that hold the path line points array and store into the class object.