diff --git a/source/FFImageLoading.Svg.Shared/SkSvg.cs b/source/FFImageLoading.Svg.Shared/SkSvg.cs index 8b2a73f3b..964bbe822 100644 --- a/source/FFImageLoading.Svg.Shared/SkSvg.cs +++ b/source/FFImageLoading.Svg.Shared/SkSvg.cs @@ -991,7 +991,7 @@ private void ReadPaints(Dictionary style, ref SKPaint strokePain if (ColorHelper.TryParse(stroke, out SKColor color)) { // preserve alpha - if (color.Alpha == 255 && (fillPaint == null || fillPaint.Color.Alpha > 0)) + if (color.Alpha == 255 && fillPaint.Color.Alpha > 0) strokePaint.Color = color.WithAlpha(strokePaint.Color.Alpha); else strokePaint.Color = color; @@ -1132,7 +1132,7 @@ private void ReadPaints(Dictionary style, ref SKPaint strokePain if (ColorHelper.TryParse(fill, out SKColor color)) { // preserve alpha - if (color.Alpha == 255 && (fillPaint == null || fillPaint.Color.Alpha > 0)) + if (color.Alpha == 255 && fillPaint.Color.Alpha > 0) fillPaint.Color = color.WithAlpha(fillPaint.Color.Alpha); else fillPaint.Color = color;