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
6f140f9b
Commit
6f140f9b
authored
Nov 05, 2007
by
Laurent Vromman
Committed by
Alexandre Julliard
Nov 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a test for CloseFigure.
parent
2b77fed4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
path.c
dlls/gdi32/path.c
+1
-2
path.c
dlls/gdi32/tests/path.c
+31
-0
No files found.
dlls/gdi32/path.c
View file @
6f140f9b
...
@@ -235,9 +235,8 @@ BOOL WINAPI CloseFigure(HDC hdc)
...
@@ -235,9 +235,8 @@ BOOL WINAPI CloseFigure(HDC hdc)
}
}
else
else
{
{
/* FIXME: Shouldn't we draw a line to the beginning of the
figure? */
/* Set PT_CLOSEFIGURE on the last entry and start a new stroke */
/* Set PT_CLOSEFIGURE on the last entry and start a new stroke */
/* It is not necessary to draw a line, PT_CLOSEFIGURE is a virtual closing line itself */
if
(
dc
->
path
.
numEntriesUsed
)
if
(
dc
->
path
.
numEntriesUsed
)
{
{
dc
->
path
.
pFlags
[
dc
->
path
.
numEntriesUsed
-
1
]
|=
PT_CLOSEFIGURE
;
dc
->
path
.
pFlags
[
dc
->
path
.
numEntriesUsed
-
1
]
|=
PT_CLOSEFIGURE
;
...
...
dlls/gdi32/tests/path.c
View file @
6f140f9b
...
@@ -391,10 +391,41 @@ done:
...
@@ -391,10 +391,41 @@ done:
ReleaseDC
(
0
,
hdc
);
ReleaseDC
(
0
,
hdc
);
}
}
static
void
test_closefigure
(
void
)
{
BOOL
retb
;
int
nSize
,
nSizeWitness
;
HDC
hdc
=
GetDC
(
0
);
BeginPath
(
hdc
);
MoveToEx
(
hdc
,
95
,
95
,
NULL
);
LineTo
(
hdc
,
95
,
0
);
LineTo
(
hdc
,
0
,
95
);
retb
=
CloseFigure
(
hdc
);
EndPath
(
hdc
);
nSize
=
GetPath
(
hdc
,
NULL
,
NULL
,
0
);
AbortPath
(
hdc
);
BeginPath
(
hdc
);
MoveToEx
(
hdc
,
95
,
95
,
NULL
);
LineTo
(
hdc
,
95
,
0
);
LineTo
(
hdc
,
0
,
95
);
EndPath
(
hdc
);
nSizeWitness
=
GetPath
(
hdc
,
NULL
,
NULL
,
0
);
/* This test shows CloseFigure does not have to add a point at the end of the path */
ok
(
nSize
==
nSizeWitness
,
"Wrong number of points, no point should be added by CloseFigure
\n
"
);
ReleaseDC
(
0
,
hdc
);
}
START_TEST
(
path
)
START_TEST
(
path
)
{
{
test_widenpath
();
test_widenpath
();
test_arcto
();
test_arcto
();
test_anglearc
();
test_anglearc
();
test_polydraw
();
test_polydraw
();
test_closefigure
();
}
}
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