From f35197ba1dfb834934d60d4885bcdae290dce88e Mon Sep 17 00:00:00 2001 From: Daniel Luberda Date: Tue, 30 Apr 2019 00:37:55 +0200 Subject: [PATCH] SVG: removed unnecessary dictionary --- source/FFImageLoading.Svg.Shared/SkSvg.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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: