1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-10-26 13:01:25 +03:00

Override toPath() for Path.

This commit is contained in:
Eduard Sergeev 2019-03-14 11:54:17 +07:00
parent c33ac908bc
commit f26c234fa8
2 changed files with 4 additions and 3 deletions

View File

@ -20,9 +20,6 @@ open class Locus {
}
open func toPath() -> Path {
if let path = self as? Path {
return path
}
fatalError("Unsupported locus: \(self)")
}
}

View File

@ -15,4 +15,8 @@ open class Path: Locus {
override open func bounds() -> Rect {
return toCGPath().boundingBoxOfPath.toMacaw()
}
override open func toPath() -> Path {
return self
}
}