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
5ed5daf4
Commit
5ed5daf4
authored
Feb 22, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Do some actual color blending when drawing path gradients.
parent
703b31b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
graphics.c
dlls/gdiplus/graphics.c
+17
-1
No files found.
dlls/gdiplus/graphics.c
View file @
5ed5daf4
...
...
@@ -1191,6 +1191,7 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
REAL
min_yf
,
max_yf
,
line1_xf
,
line2_xf
;
INT
min_y
,
max_y
,
min_x
,
max_x
;
INT
x
,
y
;
ARGB
outer_color
=
0xffffffff
;
stat
=
GdipClonePath
(
fill
->
path
,
&
flat_path
);
...
...
@@ -1225,6 +1226,7 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
{
int
start_center_line
=
0
,
end_center_line
=
0
;
int
seen_start
=
0
,
seen_end
=
0
,
seen_center
=
0
;
REAL
center_distance
;
type
=
flat_path
->
pathdata
.
Types
[
i
];
...
...
@@ -1258,6 +1260,10 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
else
max_y
=
(
INT
)
ceil
(
max_yf
);
/* This is proportional to the distance from start-end line to center point. */
center_distance
=
(
end_point
.
Y
-
start_point
.
Y
)
*
(
start_point
.
X
-
center_point
.
X
)
+
(
end_point
.
X
-
start_point
.
X
)
*
(
center_point
.
Y
-
start_point
.
Y
);
for
(
y
=
min_y
;
y
<
max_y
;
y
++
)
{
REAL
yf
=
(
REAL
)
y
;
...
...
@@ -1306,7 +1312,17 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
max_x
=
fill_area
->
X
+
fill_area
->
Width
;
for
(
x
=
min_x
;
x
<
max_x
;
x
++
)
argb_pixels
[(
x
-
fill_area
->
X
)
+
(
y
-
fill_area
->
Y
)
*
cdwStride
]
=
fill
->
centercolor
;
{
REAL
distance
;
distance
=
(
end_point
.
Y
-
start_point
.
Y
)
*
(
start_point
.
X
-
(
REAL
)
x
)
+
(
end_point
.
X
-
start_point
.
X
)
*
(
yf
-
start_point
.
Y
);
distance
=
distance
/
center_distance
;
argb_pixels
[(
x
-
fill_area
->
X
)
+
(
y
-
fill_area
->
Y
)
*
cdwStride
]
=
blend_colors
(
outer_color
,
fill
->
centercolor
,
distance
);
}
}
}
...
...
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