Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
331a7af3
Commit
331a7af3
authored
Jul 25, 2017
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Fix a possible floating point exception in path gradients.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4a70f67f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
graphics.c
dlls/gdiplus/graphics.c
+9
-0
No files found.
dlls/gdiplus/graphics.c
View file @
331a7af3
...
@@ -1493,9 +1493,18 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
...
@@ -1493,9 +1493,18 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
REAL
blend_amount
,
pdy
,
pdx
;
REAL
blend_amount
,
pdy
,
pdx
;
pdy
=
yf
-
center_point
.
Y
;
pdy
=
yf
-
center_point
.
Y
;
pdx
=
xf
-
center_point
.
X
;
pdx
=
xf
-
center_point
.
X
;
if
(
fabs
(
pdx
)
<=
0
.
001
&&
fabs
(
pdy
)
<=
0
.
001
)
{
/* Too close to center point, don't try to calculate outer color */
outer_color
=
start_color
;
}
else
{
blend_amount
=
(
(
center_point
.
Y
-
start_point
.
Y
)
*
pdx
+
(
start_point
.
X
-
center_point
.
X
)
*
pdy
)
/
(
dy
*
pdx
-
dx
*
pdy
);
blend_amount
=
(
(
center_point
.
Y
-
start_point
.
Y
)
*
pdx
+
(
start_point
.
X
-
center_point
.
X
)
*
pdy
)
/
(
dy
*
pdx
-
dx
*
pdy
);
outer_color
=
blend_colors
(
start_color
,
end_color
,
blend_amount
);
outer_color
=
blend_colors
(
start_color
,
end_color
,
blend_amount
);
}
}
}
distance
=
(
end_point
.
Y
-
start_point
.
Y
)
*
(
start_point
.
X
-
xf
)
+
distance
=
(
end_point
.
Y
-
start_point
.
Y
)
*
(
start_point
.
X
-
xf
)
+
(
end_point
.
X
-
start_point
.
X
)
*
(
yf
-
start_point
.
Y
);
(
end_point
.
X
-
start_point
.
X
)
*
(
yf
-
start_point
.
Y
);
...
...
Write
Preview
Markdown
is supported
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