How i can Erase My Draw Line. i m Create app like Paint so I'm Drawing line in canvas and i want to remove my line in cavas mode so how i can
note: my backround is transfranat
How i can Erase My Draw Line. i m Create app like Paint so I'm Drawing line in canvas and i want to remove my line in cavas mode so how i can
note: my backround is transfranat
Could you give more information ?
And post the code where you draw the line that you want to erase.
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.