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
461a6c46
Commit
461a6c46
authored
Mar 12, 2014
by
tebjan
Browse files
Merge remote-tracking branch 'origin/master' into textEvents
parents
75aa629d
9294fa77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/Painting/SvgGradientStop.cs
View file @
461a6c46
...
...
@@ -25,7 +25,32 @@ namespace Svg
get
{
return
this
.
_offset
;
}
set
{
this
.
_offset
=
value
.
ToPercentage
();
SvgUnit
unit
=
value
;
if
(
value
.
Type
==
SvgUnitType
.
Percentage
)
{
if
(
value
.
Value
>
100
)
{
unit
=
new
SvgUnit
(
value
.
Type
,
100
);
}
else
if
(
value
.
Value
<
0
)
{
unit
=
new
SvgUnit
(
value
.
Type
,
0
);
}
}
else
if
(
value
.
Type
==
SvgUnitType
.
User
)
{
if
(
value
.
Value
>
1
)
{
unit
=
new
SvgUnit
(
value
.
Type
,
1
);
}
else
if
(
value
.
Value
<
0
)
{
unit
=
new
SvgUnit
(
value
.
Type
,
0
);
}
}
this
.
_offset
=
unit
.
ToPercentage
();
}
}
...
...
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