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
25e15e9e
Commit
25e15e9e
authored
Oct 11, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Test PlayMetaFile on METADC.
parent
5e507b3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
metafile.c
dlls/gdi32/tests/metafile.c
+60
-0
No files found.
dlls/gdi32/tests/metafile.c
View file @
25e15e9e
...
@@ -5066,6 +5066,65 @@ static void test_emf_blit(void)
...
@@ -5066,6 +5066,65 @@ static void test_emf_blit(void)
ok
(
ret
,
"DeleteMetaFile(%p) error %ld
\n
"
,
hmf
,
GetLastError
());
ok
(
ret
,
"DeleteMetaFile(%p) error %ld
\n
"
,
hmf
,
GetLastError
());
}
}
struct
check_mf_arg
{
int
pos
;
const
WORD
*
records
;
};
static
int
WINAPI
check_mf_records
(
HDC
hdc
,
HANDLETABLE
*
htable
,
METARECORD
*
rec
,
int
n
,
LPARAM
ctx
)
{
struct
check_mf_arg
*
records
=
(
struct
check_mf_arg
*
)
ctx
;
ok
(
rec
->
rdFunction
==
records
->
records
[
records
->
pos
],
"got record %x, expected %x
\n
"
,
rec
->
rdFunction
,
records
->
records
[
records
->
pos
]);
return
rec
->
rdFunction
==
records
->
records
[
records
->
pos
++
];
}
static
void
test_PlayMetaFile
(
void
)
{
static
WORD
line_records
[]
=
{
META_LINETO
,
0
};
struct
check_mf_arg
records
;
HMETAFILE
hmeta
;
HDC
dc
,
metadc
;
BOOL
r
;
dc
=
CreateCompatibleDC
(
NULL
);
ok
(
dc
!=
NULL
,
"CreateCompatibleDC failed
\n
"
);
metadc
=
CreateMetaFileW
(
NULL
);
ok
(
metadc
!=
NULL
,
"CreateMetaFile failed
\n
"
);
r
=
LineTo
(
metadc
,
10
,
10
);
ok
(
r
,
"LineTo failed
\n
"
);
hmeta
=
CloseMetaFile
(
metadc
);
ok
(
hmeta
!=
NULL
,
"CloseMetaFile failed
\n
"
);
records
.
pos
=
0
;
records
.
records
=
line_records
;
r
=
EnumMetaFile
(
dc
,
hmeta
,
check_mf_records
,
(
LPARAM
)
&
records
);
ok
(
r
,
"EnumMetaFile failed
\n
"
);
metadc
=
CreateMetaFileW
(
NULL
);
ok
(
metadc
!=
NULL
,
"CreateMetaFile failed
\n
"
);
r
=
PlayMetaFile
(
metadc
,
hmeta
);
ok
(
r
,
"PlayMetaFile failed
\n
"
);
r
=
DeleteMetaFile
(
hmeta
);
ok
(
r
,
"DeleteMetaFile failed
\n
"
);
hmeta
=
CloseMetaFile
(
metadc
);
ok
(
hmeta
!=
NULL
,
"CloseMetaFile failed
\n
"
);
records
.
pos
=
0
;
records
.
records
=
line_records
;
r
=
EnumMetaFile
(
dc
,
hmeta
,
check_mf_records
,
(
LPARAM
)
&
records
);
ok
(
r
,
"EnumMetaFile failed
\n
"
);
r
=
DeleteMetaFile
(
hmeta
);
ok
(
r
,
"DeleteMetaFile failed
\n
"
);
r
=
DeleteDC
(
dc
);
ok
(
r
,
"DeleteDC failed
\n
"
);
}
static
void
test_emf_mask_blit
(
void
)
static
void
test_emf_mask_blit
(
void
)
{
{
BITMAPINFO
bmi
=
{{
sizeof
(
bmi
)
}};
BITMAPINFO
bmi
=
{{
sizeof
(
bmi
)
}};
...
@@ -10769,6 +10828,7 @@ START_TEST(metafile)
...
@@ -10769,6 +10828,7 @@ START_TEST(metafile)
test_mf_select
();
test_mf_select
();
test_mf_palette
();
test_mf_palette
();
test_mf_blit
();
test_mf_blit
();
test_PlayMetaFile
();
/* For metafile conversions */
/* For metafile conversions */
test_mf_conversions
();
test_mf_conversions
();
...
...
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