Skip to content

Commit

Permalink
SVG: removed unnecessary dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-luberda committed Apr 29, 2019
1 parent 5f7e499 commit f35197b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/FFImageLoading.Svg.Shared/SkSvg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class SKSvg
private readonly Dictionary<string, XElement> defs = new Dictionary<string, XElement>();
private readonly Dictionary<string, SKSvgMask> masks = new Dictionary<string, SKSvgMask>();
private readonly Dictionary<string, ISKSvgFill> fillDefs = new Dictionary<string, ISKSvgFill>();
private readonly Dictionary<string, ISKSvgFill> strokeFillDefs = new Dictionary<string, ISKSvgFill>();
private readonly Dictionary<XElement, string> elementFills = new Dictionary<XElement, string>();
private readonly Dictionary<XElement, string> strokeElementFills = new Dictionary<XElement, string>();
private readonly XmlReaderSettings xmlReaderSettings = new XmlReaderSettings()
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -1181,11 +1180,11 @@ private void ReadPaints(Dictionary<string, string> 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:
Expand Down

0 comments on commit f35197b

Please sign in to comment.