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
457a82fe
Commit
457a82fe
authored
Jun 20, 2013
by
Tebjan Halm
Browse files
fixed integer division in color server
parent
775ed568
Changes
1
Show whitespace changes
Inline
Side-by-side
Source/Painting/SvgColourServer.cs
View file @
457a82fe
...
@@ -26,7 +26,7 @@ namespace Svg
...
@@ -26,7 +26,7 @@ namespace Svg
public
override
Brush
GetBrush
(
SvgVisualElement
styleOwner
,
float
opacity
)
public
override
Brush
GetBrush
(
SvgVisualElement
styleOwner
,
float
opacity
)
{
{
int
alpha
=
(
int
)((
opacity
*
(
this
.
Colour
.
A
/
255
)
)
*
255
);
int
alpha
=
(
int
)((
opacity
*
(
this
.
Colour
.
A
/
255
.0f
)
)
*
255
);
Color
colour
=
Color
.
FromArgb
(
alpha
,
this
.
Colour
);
Color
colour
=
Color
.
FromArgb
(
alpha
,
this
.
Colour
);
return
new
SolidBrush
(
colour
);
return
new
SolidBrush
(
colour
);
...
...
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