Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
efd6005f
Commit
efd6005f
authored
10 years ago
by
tebjan
Browse files
Options
Download
Email Patches
Plain Diff
color converter now uses invariant culture to parse
parent
76cf593c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/Painting/SvgColourConverter.cs
+8
-2
Source/Painting/SvgColourConverter.cs
with
8 additions
and
2 deletions
+8
-2
Source/Painting/SvgColourConverter.cs
+
8
-
2
View file @
efd6005f
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Drawing
;
using
System.Globalization
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
namespace
Svg
{
...
...
@@ -31,6 +32,9 @@ namespace Svg
if
(
colour
!=
null
)
{
var
oldCulture
=
Thread
.
CurrentThread
.
CurrentCulture
;
Thread
.
CurrentThread
.
CurrentCulture
=
System
.
Globalization
.
CultureInfo
.
InvariantCulture
;
colour
=
colour
.
Trim
();
if
(
colour
.
StartsWith
(
"rgb"
))
...
...
@@ -79,6 +83,8 @@ namespace Svg
colour
=
string
.
Format
(
culture
,
"#{0}{0}{1}{1}{2}{2}"
,
colour
[
1
],
colour
[
2
],
colour
[
3
]);
return
base
.
ConvertFrom
(
context
,
culture
,
colour
);
}
Thread
.
CurrentThread
.
CurrentCulture
=
oldCulture
;
}
return
base
.
ConvertFrom
(
context
,
culture
,
value
);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help