SVGPaintable.SetStyle C# (CSharp) Method

SetStyle() private method

private SetStyle ( string styleString ) : void
styleString string
return void
    private void SetStyle(string styleString)
    {
        Dictionary<string, string> _dictionary = new Dictionary<string, string>();
        SVGStringExtractor.ExtractStyleValue(styleString, ref _dictionary);
        if(_dictionary.ContainsKey("fill")) {
          string fill = _dictionary["fill"];
          if(fill.Contains("url"))
        _gradientID = SVGStringExtractor.ExtractUrl4Gradient(fill);
          else
        _fillColor = new SVGColor(fill);
        }
        if(_dictionary.ContainsKey("stroke"))
          _strokeColor = new SVGColor(_dictionary["stroke"]);
        if(_dictionary.ContainsKey("stroke-width")) {
          isStrokeWidth = true;
          _strokeWidth = new SVGLength(_dictionary["stroke-width"]);
        }
        if(_dictionary.ContainsKey("stroke-linecap"))
          SetStrokeLineCap(_dictionary["stroke-linecap"]);
        if(_dictionary.ContainsKey("stroke-linejoin"))
          SetStrokeLineJoin(_dictionary["stroke-linejoin"]);
    }