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
4ed1b4f5
Commit
4ed1b4f5
authored
Apr 06, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Allow recording metafiles with a NULL frame.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1e67fcce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
15 deletions
+16
-15
metafile.c
dlls/gdiplus/metafile.c
+9
-8
metafile.c
dlls/gdiplus/tests/metafile.c
+7
-7
No files found.
dlls/gdiplus/metafile.c
View file @
4ed1b4f5
...
...
@@ -195,7 +195,7 @@ GpStatus WINGDIPAPI GdipRecordMetafile(HDC hdc, EmfType type, GDIPCONST GpRectF
HDC
record_dc
;
REAL
dpix
,
dpiy
;
REAL
framerect_factor_x
,
framerect_factor_y
;
RECT
rc
;
RECT
rc
,
*
lprc
;
GpStatus
stat
;
TRACE
(
"(%p %d %p %d %p %p)
\n
"
,
hdc
,
type
,
frameRect
,
frameUnit
,
desc
,
metafile
);
...
...
@@ -203,15 +203,11 @@ GpStatus WINGDIPAPI GdipRecordMetafile(HDC hdc, EmfType type, GDIPCONST GpRectF
if
(
!
hdc
||
type
<
EmfTypeEmfOnly
||
type
>
EmfTypeEmfPlusDual
||
!
metafile
)
return
InvalidParameter
;
if
(
!
frameRect
)
{
FIXME
(
"not implemented for NULL rect
\n
"
);
return
NotImplemented
;
}
dpix
=
(
REAL
)
GetDeviceCaps
(
hdc
,
HORZRES
)
/
GetDeviceCaps
(
hdc
,
HORZSIZE
)
*
25
.
4
;
dpiy
=
(
REAL
)
GetDeviceCaps
(
hdc
,
VERTRES
)
/
GetDeviceCaps
(
hdc
,
VERTSIZE
)
*
25
.
4
;
if
(
frameRect
)
{
switch
(
frameUnit
)
{
case
MetafileFrameUnitPixel
:
...
...
@@ -242,7 +238,12 @@ GpStatus WINGDIPAPI GdipRecordMetafile(HDC hdc, EmfType type, GDIPCONST GpRectF
rc
.
right
=
rc
.
left
+
framerect_factor_x
*
frameRect
->
Width
;
rc
.
bottom
=
rc
.
top
+
framerect_factor_y
*
frameRect
->
Height
;
record_dc
=
CreateEnhMetaFileW
(
hdc
,
NULL
,
&
rc
,
desc
);
lprc
=
&
rc
;
}
else
lprc
=
NULL
;
record_dc
=
CreateEnhMetaFileW
(
hdc
,
NULL
,
lprc
,
desc
);
if
(
!
record_dc
)
return
GenericError
;
...
...
dlls/gdiplus/tests/metafile.c
View file @
4ed1b4f5
...
...
@@ -876,7 +876,7 @@ static void test_nullframerect(void) {
hdc
=
CreateCompatibleDC
(
0
);
stat
=
GdipRecordMetafile
(
hdc
,
EmfTypeEmfPlusOnly
,
NULL
,
MetafileFrameUnitPixel
,
description
,
&
metafile
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
DeleteDC
(
hdc
);
...
...
@@ -917,10 +917,10 @@ static void test_nullframerect(void) {
stat
=
GdipGetImageBounds
((
GpImage
*
)
metafile
,
&
bounds
,
&
unit
);
expect
(
Ok
,
stat
);
expect
(
UnitPixel
,
unit
);
expectf_
(
25
.
0
,
bounds
.
X
,
0
.
05
);
expectf_
(
25
.
0
,
bounds
.
Y
,
0
.
05
);
expectf_
(
75
.
0
,
bounds
.
Width
,
0
.
05
);
expectf_
(
75
.
0
,
bounds
.
Height
,
0
.
05
);
todo_wine
expectf_
(
25
.
0
,
bounds
.
X
,
0
.
05
);
todo_wine
expectf_
(
25
.
0
,
bounds
.
Y
,
0
.
05
);
todo_wine
expectf_
(
75
.
0
,
bounds
.
Width
,
0
.
05
);
todo_wine
expectf_
(
75
.
0
,
bounds
.
Height
,
0
.
05
);
stat
=
GdipDisposeImage
((
GpImage
*
)
metafile
);
expect
(
Ok
,
stat
);
...
...
@@ -966,8 +966,8 @@ static void test_nullframerect(void) {
expect
(
UnitPixel
,
unit
);
expectf_
(
25
.
0
,
bounds
.
X
,
0
.
05
);
expectf_
(
25
.
0
,
bounds
.
Y
,
0
.
05
);
expectf_
(
50
.
0
,
bounds
.
Width
,
0
.
05
);
expectf_
(
50
.
0
,
bounds
.
Height
,
0
.
05
);
todo_wine
expectf_
(
50
.
0
,
bounds
.
Width
,
0
.
05
);
todo_wine
expectf_
(
50
.
0
,
bounds
.
Height
,
0
.
05
);
stat
=
GdipDisposeImage
((
GpImage
*
)
metafile
);
expect
(
Ok
,
stat
);
...
...
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