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
d2e999d2
Commit
d2e999d2
authored
Sep 14, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Sep 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Use the preset blend when drawing linear gradients.
parent
ad6adc75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
graphics.c
dlls/gdiplus/graphics.c
+21
-1
No files found.
dlls/gdiplus/graphics.c
View file @
d2e999d2
...
@@ -220,7 +220,27 @@ static ARGB blend_line_gradient(GpLineGradient* brush, REAL position)
...
@@ -220,7 +220,27 @@ static ARGB blend_line_gradient(GpLineGradient* brush, REAL position)
blendfac
=
(
left_blendfac
*
(
right_blendpos
-
position
)
+
blendfac
=
(
left_blendfac
*
(
right_blendpos
-
position
)
+
right_blendfac
*
(
position
-
left_blendpos
))
/
range
;
right_blendfac
*
(
position
-
left_blendpos
))
/
range
;
}
}
return
blend_colors
(
brush
->
startcolor
,
brush
->
endcolor
,
blendfac
);
if
(
brush
->
pblendcount
==
0
)
return
blend_colors
(
brush
->
startcolor
,
brush
->
endcolor
,
blendfac
);
else
{
int
i
=
1
;
ARGB
left_blendcolor
,
right_blendcolor
;
REAL
left_blendpos
,
right_blendpos
;
/* locate the blend colors surrounding this position */
while
(
blendfac
>
brush
->
pblendpos
[
i
])
i
++
;
/* interpolate between the blend colors */
left_blendpos
=
brush
->
pblendpos
[
i
-
1
];
left_blendcolor
=
brush
->
pblendcolor
[
i
-
1
];
right_blendpos
=
brush
->
pblendpos
[
i
];
right_blendcolor
=
brush
->
pblendcolor
[
i
];
blendfac
=
(
blendfac
-
left_blendpos
)
/
(
right_blendpos
-
left_blendpos
);
return
blend_colors
(
left_blendcolor
,
right_blendcolor
,
blendfac
);
}
}
}
static
void
brush_fill_path
(
GpGraphics
*
graphics
,
GpBrush
*
brush
)
static
void
brush_fill_path
(
GpGraphics
*
graphics
,
GpBrush
*
brush
)
...
...
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