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
525fd823
Commit
525fd823
authored
Apr 02, 2007
by
Laurent Vromman
Committed by
Alexandre Julliard
Apr 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Correction of WidenPath behaviour when pen width is 1.
parent
94b9b614
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
path.c
dlls/gdi32/path.c
+5
-0
path.c
dlls/gdi32/tests/path.c
+15
-1
No files found.
dlls/gdi32/path.c
View file @
525fd823
...
...
@@ -1795,6 +1795,11 @@ static BOOL PATH_WidenPath(DC *dc)
penWidth
=
elp
->
elpWidth
;
HeapFree
(
GetProcessHeap
(),
0
,
elp
);
/* pen width must be strictly higher than 1 */
if
(
penWidth
==
1
)
{
return
TRUE
;
}
/* FIXME : If extPen, use the shape on corners */
penWidthIn
=
penWidth
/
2
;
penWidthOut
=
penWidth
/
2
;
...
...
dlls/gdi32/tests/path.c
View file @
525fd823
...
...
@@ -19,6 +19,7 @@
*/
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
...
...
@@ -31,7 +32,7 @@
static
void
test_widenpath
(
void
)
{
HDC
hdc
=
GetDC
(
0
);
HPEN
greenPen
;
HPEN
greenPen
,
narrowPen
;
HPEN
oldPen
;
POINT
pnt
[
6
];
INT
nSize
;
...
...
@@ -67,6 +68,8 @@ static void test_widenpath(void)
ok
(
nSize
!=
-
1
,
"GetPath fails after calling WidenPath.
\n
"
);
ok
(
nSize
>
6
,
"Path number of points is to low. Should be more than 6 but is %d
\n
"
,
nSize
);
AbortPath
(
hdc
);
todo_wine
{
/* Test WidenPath with an empty path */
SetLastError
(
0xdeadbeef
);
...
...
@@ -74,6 +77,17 @@ static void test_widenpath(void)
ok
(
WidenPath
(
hdc
)
==
FALSE
,
"WidenPath fails while widening an empty path. Error : %d
\n
"
,
GetLastError
());
}
AbortPath
(
hdc
);
/* Test when the pen width is equal to 1. The path should not change */
narrowPen
=
CreatePen
(
PS_SOLID
,
1
,
RGB
(
0
,
0
,
0
));
oldPen
=
SelectObject
(
hdc
,
narrowPen
);
BeginPath
(
hdc
);
Polyline
(
hdc
,
pnt
,
6
);
EndPath
(
hdc
);
nSize
=
GetPath
(
hdc
,
NULL
,
NULL
,
0
);
ok
(
nSize
==
6
,
"WidenPath fails detecting 1px wide pen. Path length is %d, should be 6
\n
"
,
nSize
);
ReleaseDC
(
0
,
hdc
);
return
;
}
...
...
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