I found a mistake in the UIBezierPath+WeightedPoint.swift file,https://github.com/uber/UberSignature/blob/master/Sources/Swift/Internal/UIBezierPath%2BWeightedPoint.swift
Original code
class func line(withWeightedPointA pointA: WeightedPoint, pointB: WeightedPoint) -> UIBezierPath {
let lines = linesPerpendicularToLine(from: pointA, to: pointB)
let path = UIBezierPath()
path.move(to: lines.0.startPoint)
path.addLine(to: lines.1.startPoint)
path.addLine(to: lines.1.endPoint)
**path.addLine(to: lines.0. startPoint)**
path.close()
return path
}
Sometimes it causes the drawn lines to be jagged.
I read the code of Objects-C,It should be changed to solve this problem.
class func line(withWeightedPointA pointA: WeightedPoint, pointB: WeightedPoint) -> UIBezierPath {
let lines = linesPerpendicularToLine(from: pointA, to: pointB)
let path = UIBezierPath()
path.move(to: lines.0.startPoint)
path.addLine(to: lines.1.startPoint)
path.addLine(to: lines.1.endPoint)
**path.addLine(to: lines.0.endPoint)**
path.close()
return path
}
I found a mistake in the UIBezierPath+WeightedPoint.swift file,
https://github.com/uber/UberSignature/blob/master/Sources/Swift/Internal/UIBezierPath%2BWeightedPoint.swift
Original codeSometimes it causes the drawn lines to be jagged. I read the code of Objects-C,It should be changed to solve this problem.
You can confirm this question.