diff --git a/source/FFImageLoading.Svg.Shared/SkSvg.cs b/source/FFImageLoading.Svg.Shared/SkSvg.cs index 627251ad2..6b7cc06aa 100644 --- a/source/FFImageLoading.Svg.Shared/SkSvg.cs +++ b/source/FFImageLoading.Svg.Shared/SkSvg.cs @@ -31,7 +31,6 @@ public class SKSvg private readonly Dictionary defs = new Dictionary(); private readonly Dictionary masks = new Dictionary(); private readonly Dictionary fillDefs = new Dictionary(); - private readonly Dictionary strokeFillDefs = new Dictionary(); private readonly Dictionary elementFills = new Dictionary(); private readonly Dictionary strokeElementFills = new Dictionary(); private readonly XmlReaderSettings xmlReaderSettings = new XmlReaderSettings() @@ -300,7 +299,7 @@ private void ReadElement(XElement e, SKCanvas canvas, SKPaint stroke, SKPaint fi } if (stroke != null && strokeElementFills.TryGetValue(e, - out var strokeFillId) && strokeFillDefs.TryGetValue(strokeFillId, out var addStrokeFill)) + out var strokeFillId) && fillDefs.TryGetValue(strokeFillId, out var addStrokeFill)) { var points = ReadElementXY(e); var elementSize = ReadElementSize(e); @@ -1181,11 +1180,11 @@ private void ReadPaints(Dictionary style, ref SKPaint strokePain switch (defE.Name.LocalName.ToLower()) { case "lineargradient": - strokeFillDefs[id] = ReadLinearGradient(defE); + fillDefs[id] = ReadLinearGradient(defE); strokeFillId = id; break; case "radialgradient": - strokeFillDefs[id] = ReadRadialGradient(defE); + fillDefs[id] = ReadRadialGradient(defE); strokeFillId = id; break; default: