From 3bdc97d6937a4e8cddf904ced93ea7a9f9da624d Mon Sep 17 00:00:00 2001 From: Daniel Luberda Date: Sat, 9 Jun 2018 18:29:51 +0200 Subject: [PATCH] SVG fixes --- source/FFImageLoading.Svg.Shared/SkSvg.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/FFImageLoading.Svg.Shared/SkSvg.cs b/source/FFImageLoading.Svg.Shared/SkSvg.cs index 7af23e68f..efc6d143f 100644 --- a/source/FFImageLoading.Svg.Shared/SkSvg.cs +++ b/source/FFImageLoading.Svg.Shared/SkSvg.cs @@ -441,7 +441,7 @@ private void ReadElement(XElement e, SKCanvas canvas, SKPaint stroke, SKPaint fi foreach (var gElement in e.Elements()) { - using (var paint = fill.Clone()) + using (var paint = fill?.Clone() ?? CreatePaint()) { paint.BlendMode = SKBlendMode.SrcIn; ReadElement(gElement, canvas, paint, paint); @@ -521,7 +521,7 @@ private void ReadElement(XElement e, SKCanvas canvas, SKPaint stroke, SKPaint fi case "mask": if (e.HasElements) { - masks.Add(ReadId(e), new SKSvgMask(fill, e)); + masks.Add(ReadId(e), new SKSvgMask(fill ?? CreatePaint(), e)); } break; case "defs":