Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
0abe828b
Commit
0abe828b
authored
Nov 13, 2013
by
Tebjan Halm
Browse files
if fill value is empty, create a NotSet colour server... regarding issue #31
parent
0c67bba4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Painting/SvgPaintServerFactory.cs
View file @
0abe828b
...
...
@@ -23,9 +23,9 @@ namespace Svg
public
static
SvgPaintServer
Create
(
string
value
,
SvgDocument
document
)
{
// 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
)
{
...
...
@@ -49,7 +49,7 @@ namespace Svg
if
(
value
is
string
)
{
var
s
=
(
string
)
value
;
if
(
String
.
Equals
(
s
,
"none"
,
StringComparison
.
OrdinalIgnoreCase
))
if
(
String
.
Equals
(
s
.
Trim
()
,
"none"
,
StringComparison
.
OrdinalIgnoreCase
))
return
SvgPaintServer
.
None
;
else
return
SvgPaintServerFactory
.
Create
(
s
,
(
SvgDocument
)
context
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment