SVGPaintable.Initialize C# (CSharp) Method

Initialize() private method

private Initialize ( string>.Dictionary attrList ) : void
attrList string>.Dictionary
return void
    private void Initialize(Dictionary<string, string> attrList)
    {
        isStrokeWidth = false;

        if(attrList.ContainsKey("fill")) {
          string fill = attrList["fill"];
          if(fill.Contains("url"))
        _gradientID = SVGStringExtractor.ExtractUrl4Gradient(fill);
          else
        _fillColor = new SVGColor(fill);
        }

        _strokeColor = new SVGColor(attrList.GetValue("stroke"));

        if(attrList.ContainsKey("stroke-width")) {
          isStrokeWidth = true;
          _strokeWidth = new SVGLength(attrList["stroke-width"]);
        }

        SetStrokeLineCap(attrList.GetValue("stroke-linecap"));
        SetStrokeLineJoin(attrList.GetValue("stroke-linejoin"));

        if(!attrList.ContainsKey("stroke-width"))
          _strokeWidth.NewValueSpecifiedUnits(1f);
        SetStyle(attrList.GetValue("style"));
    }