Commit 0abe828b authored by Tebjan Halm's avatar Tebjan Halm
Browse files

if fill value is empty, create a NotSet colour server... regarding issue #31

parent 0c67bba4
...@@ -23,9 +23,9 @@ namespace Svg ...@@ -23,9 +23,9 @@ namespace Svg
public static SvgPaintServer Create(string value, SvgDocument document) public static SvgPaintServer Create(string value, SvgDocument document)
{ {
// If it's pointing to a paint server // If it's pointing to a paint server
if (string.IsNullOrEmpty(value) || value.ToLower().Trim() == "none") if (string.IsNullOrEmpty(value))
{ {
return new SvgColourServer(Color.Transparent); return SvgColourServer.NotSet;
} }
else if (value.IndexOf("url(#") > -1) else if (value.IndexOf("url(#") > -1)
{ {
...@@ -49,7 +49,7 @@ namespace Svg ...@@ -49,7 +49,7 @@ namespace Svg
if (value is string) if (value is string)
{ {
var s = (string) value; var s = (string) value;
if(String.Equals( s, "none", StringComparison.OrdinalIgnoreCase)) if(String.Equals( s.Trim(), "none", StringComparison.OrdinalIgnoreCase))
return SvgPaintServer.None; return SvgPaintServer.None;
else else
return SvgPaintServerFactory.Create(s, (SvgDocument)context); return SvgPaintServerFactory.Create(s, (SvgDocument)context);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment