Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ee745011
Commit
ee745011
authored
Aug 03, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Fix rectangles of horizontal and vertical gradients.
parent
b05ebca6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
brush.c
dlls/gdiplus/brush.c
+11
-0
brush.c
dlls/gdiplus/tests/brush.c
+4
-4
No files found.
dlls/gdiplus/brush.c
View file @
ee745011
...
...
@@ -261,6 +261,17 @@ GpStatus WINGDIPAPI GdipCreateLineBrush(GDIPCONST GpPointF* startpoint,
(
*
line
)
->
rect
.
Width
=
fabs
(
startpoint
->
X
-
endpoint
->
X
);
(
*
line
)
->
rect
.
Height
=
fabs
(
startpoint
->
Y
-
endpoint
->
Y
);
if
((
*
line
)
->
rect
.
Width
==
0
)
{
(
*
line
)
->
rect
.
X
-=
(
*
line
)
->
rect
.
Height
/
2
.
0
f
;
(
*
line
)
->
rect
.
Width
=
(
*
line
)
->
rect
.
Height
;
}
else
if
((
*
line
)
->
rect
.
Height
==
0
)
{
(
*
line
)
->
rect
.
Y
-=
(
*
line
)
->
rect
.
Width
/
2
.
0
f
;
(
*
line
)
->
rect
.
Height
=
(
*
line
)
->
rect
.
Width
;
}
(
*
line
)
->
blendcount
=
1
;
(
*
line
)
->
blendfac
=
GdipAlloc
(
sizeof
(
REAL
));
(
*
line
)
->
blendpos
=
GdipAlloc
(
sizeof
(
REAL
));
...
...
dlls/gdiplus/tests/brush.c
View file @
ee745011
...
...
@@ -310,9 +310,9 @@ static void test_gradientgetrect(void)
memset
(
&
rectf
,
0
,
sizeof
(
GpRectF
));
status
=
GdipGetLineRect
(
brush
,
&
rectf
);
expect
(
Ok
,
status
);
todo_wine
expectf
(
-
5
.
0
,
rectf
.
X
);
expectf
(
-
5
.
0
,
rectf
.
X
);
expectf
(
0
.
0
,
rectf
.
Y
);
todo_wine
expectf
(
10
.
0
,
rectf
.
Width
);
expectf
(
10
.
0
,
rectf
.
Width
);
expectf
(
10
.
0
,
rectf
.
Height
);
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* horizontal gradient */
...
...
@@ -324,9 +324,9 @@ static void test_gradientgetrect(void)
status
=
GdipGetLineRect
(
brush
,
&
rectf
);
expect
(
Ok
,
status
);
expectf
(
0
.
0
,
rectf
.
X
);
todo_wine
expectf
(
-
5
.
0
,
rectf
.
Y
);
expectf
(
-
5
.
0
,
rectf
.
Y
);
expectf
(
10
.
0
,
rectf
.
Width
);
todo_wine
expectf
(
10
.
0
,
rectf
.
Height
);
expectf
(
10
.
0
,
rectf
.
Height
);
status
=
GdipDeleteBrush
((
GpBrush
*
)
brush
);
/* slope = -1 */
pt1
.
X
=
pt1
.
Y
=
0
.
0
;
...
...
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