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
6d1b5eb5
Commit
6d1b5eb5
authored
10 years ago
by
tebjan
Committed by
Eric Domke
10 years ago
Browse files
Options
Download
Email Patches
Plain Diff
color converter now uses invariant culture to parse
parent
31b085c6
master
netstandard2
nuget2.4.2
nuget2.4.1
nuget2.4
nuget2.3
nuget2.2.2
nuget2.2.1
No related merge requests found
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 @
6d1b5eb5
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