1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-21 01:47:44 +03:00

Fix out of bounds stroke opacity

This commit is contained in:
Alisa Mylnikova 2018-05-07 18:29:31 +07:00
parent 495f42e864
commit 33284c3743

View File

@ -608,6 +608,7 @@ open class SVGParser {
var opacity: Double = 1
if let strokeOpacity = styleParts["stroke-opacity"] {
opacity = Double(strokeOpacity.replacingOccurrences(of: " ", with: "")) ?? 1
opacity = min(max(opacity, 0), 1)
}
var fill: Fill?
if let defaultColor = SVGConstants.colorList[strokeColor] {