1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-08-15 16:10:39 +03:00

Fix #688: Review fixes

This commit is contained in:
Alisa Mylnikova 2020-05-28 16:15:53 +07:00
parent 195f828f77
commit 8d6607c307

View File

@ -154,9 +154,18 @@ public extension Node {
}
extension CGPath {
extension UIBezierPath {
public func toMacaw() -> Path {
let fillRule: FillRule = self.usesEvenOddFillRule ? .evenodd : .nonzero
return self.cgPath.toMacaw(fillRule: fillRule)
}
}
extension CGPath {
public func toMacaw(fillRule: FillRule = .nonzero) -> Path {
func createPathSegment(type: PathSegmentType, points: UnsafeMutablePointer<CGPoint>, count: Int) -> PathSegment {
@ -184,7 +193,7 @@ extension CGPath {
case .closeSubpath:
segment = PathSegment(type: .z)
@unknown default:
fatalError()
fatalError("Unknown element type: \(element.type)")
}
segments.append(segment)
})