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:
parent
c33ac908bc
commit
f26c234fa8
@ -20,9 +20,6 @@ open class Locus {
|
||||
}
|
||||
|
||||
open func toPath() -> Path {
|
||||
if let path = self as? Path {
|
||||
return path
|
||||
}
|
||||
fatalError("Unsupported locus: \(self)")
|
||||
}
|
||||
}
|
||||
|
@ -15,4 +15,8 @@ open class Path: Locus {
|
||||
override open func bounds() -> Rect {
|
||||
return toCGPath().boundingBoxOfPath.toMacaw()
|
||||
}
|
||||
|
||||
override open func toPath() -> Path {
|
||||
return self
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user