mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-11 05:05:23 +03:00
Fix #688: Review fixes
This commit is contained in:
parent
195f828f77
commit
8d6607c307
@ -154,9 +154,18 @@ public extension Node {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension CGPath {
|
extension UIBezierPath {
|
||||||
|
|
||||||
public func toMacaw() -> Path {
|
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 {
|
func createPathSegment(type: PathSegmentType, points: UnsafeMutablePointer<CGPoint>, count: Int) -> PathSegment {
|
||||||
|
|
||||||
@ -184,7 +193,7 @@ extension CGPath {
|
|||||||
case .closeSubpath:
|
case .closeSubpath:
|
||||||
segment = PathSegment(type: .z)
|
segment = PathSegment(type: .z)
|
||||||
@unknown default:
|
@unknown default:
|
||||||
fatalError()
|
fatalError("Unknown element type: \(element.type)")
|
||||||
}
|
}
|
||||||
segments.append(segment)
|
segments.append(segment)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user