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
625ff9b5
Commit
625ff9b5
authored
Jun 21, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement a path driver for enhanced metafiles.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6bab6ad4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
6 deletions
+70
-6
dc.c
dlls/gdi32/enhmfdrv/dc.c
+0
-0
enhmetafiledrv.h
dlls/gdi32/enhmfdrv/enhmetafiledrv.h
+1
-0
metafile.c
dlls/gdi32/tests/metafile.c
+69
-6
No files found.
dlls/gdi32/enhmfdrv/dc.c
View file @
625ff9b5
This diff is collapsed.
Click to expand it.
dlls/gdi32/enhmfdrv/enhmetafiledrv.h
View file @
625ff9b5
...
...
@@ -33,6 +33,7 @@
typedef
struct
{
struct
gdi_physdev
dev
;
struct
gdi_physdev
pathdev
;
ENHMETAHEADER
*
emh
;
/* Pointer to enhanced metafile header */
UINT
handles_size
,
cur_handles
;
HGDIOBJ
*
handles
;
...
...
dlls/gdi32/tests/metafile.c
View file @
625ff9b5
...
...
@@ -2401,7 +2401,7 @@ static void test_emf_ExtTextOut_on_path(void)
ok
(
ret
,
"BeginPath error %d
\n
"
,
GetLastError
());
ret
=
ExtTextOutA
(
hdcMetafile
,
11
,
22
,
0
,
NULL
,
"Test"
,
4
,
dx
);
ok
(
ret
,
"ExtTextOut error %d
\n
"
,
GetLastError
());
todo_wine
ok
(
ret
,
"ExtTextOut error %d
\n
"
,
GetLastError
());
ret
=
EndPath
(
hdcMetafile
);
ok
(
ret
,
"EndPath error %d
\n
"
,
GetLastError
());
...
...
@@ -3673,7 +3673,36 @@ static const unsigned char EMF_PATH_BITS[] =
0x10
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
};
static
void
test_emf_GetPath
(
void
)
static
const
unsigned
char
EMF_EMPTY_PATH_BITS
[]
=
{
0x01
,
0x00
,
0x00
,
0x00
,
0x6c
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xd8
,
0xff
,
0xff
,
0xff
,
0xd8
,
0xff
,
0xff
,
0xff
,
0x20
,
0x45
,
0x4d
,
0x46
,
0x00
,
0x00
,
0x01
,
0x00
,
0xc8
,
0x00
,
0x00
,
0x00
,
0x0b
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x20
,
0x03
,
0x00
,
0x00
,
0x58
,
0x02
,
0x00
,
0x00
,
0x40
,
0x01
,
0x00
,
0x00
,
0xf0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xe2
,
0x04
,
0x00
,
0x80
,
0xa9
,
0x03
,
0x00
,
0x3b
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x3d
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x3b
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x3c
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x3c
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x3d
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x3b
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x44
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x44
,
0x00
,
0x00
,
0x00
,
0x08
,
0x00
,
0x00
,
0x00
,
0x0e
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x10
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
};
static
void
test_emf_paths
(
void
)
{
POINT
pts
[
9
]
=
{{
10
,
10
},
{
20
,
10
},
{
10
,
20
},
{
20
,
20
},
{
30
,
30
},
{
40
,
20
},
{
20
,
30
},
{
20
,
20
},
{
20
,
10
}};
DWORD
counts
[
2
]
=
{
2
,
2
};
...
...
@@ -3719,10 +3748,44 @@ static void test_emf_GetPath(void)
hemf
=
CloseEnhMetaFile
(
hdcMetafile
);
ok
(
hemf
!=
0
,
"CloseEnhMetaFile error %d
\n
"
,
GetLastError
());
if
(
compare_emf_bits
(
hemf
,
EMF_PATH_BITS
,
sizeof
(
EMF_PATH_BITS
),
"test_emf_GetPath"
,
FALSE
)
!=
0
)
if
(
compare_emf_bits
(
hemf
,
EMF_PATH_BITS
,
sizeof
(
EMF_PATH_BITS
),
"test_emf_paths"
,
FALSE
)
!=
0
)
{
dump_emf_bits
(
hemf
,
"test_emf_paths"
);
dump_emf_records
(
hemf
,
"test_emf_paths"
);
}
DeleteEnhMetaFile
(
hemf
);
SetLastError
(
0xdeadbeef
);
hdcMetafile
=
CreateEnhMetaFileA
(
GetDC
(
0
),
NULL
,
NULL
,
NULL
);
ok
(
hdcMetafile
!=
0
,
"CreateEnhMetaFileA error %d
\n
"
,
GetLastError
());
ret
=
BeginPath
(
hdcMetafile
);
ok
(
ret
,
"BeginPath failed error %d
\n
"
,
GetLastError
()
);
ret
=
CloseFigure
(
hdcMetafile
);
ok
(
ret
,
"CloseFigure failed error %d
\n
"
,
GetLastError
()
);
ret
=
BeginPath
(
hdcMetafile
);
ok
(
ret
,
"BeginPath failed error %d
\n
"
,
GetLastError
()
);
ret
=
EndPath
(
hdcMetafile
);
ok
(
ret
,
"EndPath failed error %d
\n
"
,
GetLastError
()
);
ret
=
EndPath
(
hdcMetafile
);
ok
(
!
ret
,
"EndPath succeeded
\n
"
);
ret
=
CloseFigure
(
hdcMetafile
);
ok
(
!
ret
,
"CloseFigure succeeded
\n
"
);
ret
=
BeginPath
(
hdcMetafile
);
ok
(
ret
,
"BeginPath failed error %d
\n
"
,
GetLastError
()
);
ret
=
AbortPath
(
hdcMetafile
);
ok
(
ret
,
"AbortPath failed error %d
\n
"
,
GetLastError
()
);
ret
=
AbortPath
(
hdcMetafile
);
ok
(
ret
,
"AbortPath failed error %d
\n
"
,
GetLastError
()
);
hemf
=
CloseEnhMetaFile
(
hdcMetafile
);
ok
(
hemf
!=
0
,
"CloseEnhMetaFile error %d
\n
"
,
GetLastError
());
if
(
compare_emf_bits
(
hemf
,
EMF_EMPTY_PATH_BITS
,
sizeof
(
EMF_EMPTY_PATH_BITS
),
"empty path"
,
FALSE
)
!=
0
)
{
dump_emf_bits
(
hemf
,
"
test_emf_GetP
ath"
);
dump_emf_records
(
hemf
,
"
test_emf_GetP
ath"
);
dump_emf_bits
(
hemf
,
"
empty p
ath"
);
dump_emf_records
(
hemf
,
"
empty p
ath"
);
}
DeleteEnhMetaFile
(
hemf
);
...
...
@@ -3839,7 +3902,7 @@ START_TEST(metafile)
test_emf_ExtTextOut_on_path
();
test_emf_clipping
();
test_emf_polybezier
();
test_emf_
GetPath
();
test_emf_
paths
();
test_emf_PolyPolyline
();
test_emf_GradientFill
();
...
...
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