mirror of
https://github.com/exyte/Macaw.git
synced 2024-11-11 01:42:35 +03:00
Merge pull request #329 from f3dm76/task/opacityRounding
Fix #328: Fill opacity > 1 is processed incorrectly
This commit is contained in:
commit
48504ea7e5
@ -531,6 +531,7 @@ open class SVGParser {
|
||||
}
|
||||
|
||||
fileprivate func createColor(_ hexString: String, opacity: Double = 1) -> Color {
|
||||
let opacity = min(max(opacity, 0), 1)
|
||||
var cleanedHexString = hexString
|
||||
if hexString.hasPrefix("#") {
|
||||
cleanedHexString = hexString.replacingOccurrences(of: "#", with: "")
|
||||
|
Loading…
Reference in New Issue
Block a user