Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e4105824
Commit
e4105824
authored
May 17, 2020
by
Vincent Povirk
Committed by
Alexandre Julliard
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Improve GdipSetMetafileDownLevelRasterizationLimit.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6c061964
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
1 deletion
+27
-1
metafile.c
dlls/gdiplus/metafile.c
+7
-1
metafile.c
dlls/gdiplus/tests/metafile.c
+20
-0
No files found.
dlls/gdiplus/metafile.c
View file @
e4105824
...
...
@@ -4028,9 +4028,15 @@ GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metaf
{
TRACE
(
"(%p,%u)
\n
"
,
metafile
,
limitDpi
);
if
(
!
metafile
)
if
(
limitDpi
==
0
)
limitDpi
=
96
;
if
(
!
metafile
||
limitDpi
<
10
)
return
InvalidParameter
;
if
(
!
metafile
->
record_dc
)
return
WrongState
;
metafile
->
limit_dpi
=
limitDpi
;
return
Ok
;
...
...
dlls/gdiplus/tests/metafile.c
View file @
e4105824
...
...
@@ -428,6 +428,23 @@ static void test_empty(void)
expect
(
Ok
,
stat
);
ok
(
limit_dpi
==
255
,
"limit_dpi was %d
\n
"
,
limit_dpi
);
stat
=
GdipSetMetafileDownLevelRasterizationLimit
(
metafile
,
0
);
expect
(
Ok
,
stat
);
limit_dpi
=
0xdeadbeef
;
stat
=
GdipGetMetafileDownLevelRasterizationLimit
(
metafile
,
&
limit_dpi
);
expect
(
Ok
,
stat
);
ok
(
limit_dpi
==
96
,
"limit_dpi was %d
\n
"
,
limit_dpi
);
stat
=
GdipSetMetafileDownLevelRasterizationLimit
(
metafile
,
1
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetMetafileDownLevelRasterizationLimit
(
metafile
,
9
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipSetMetafileDownLevelRasterizationLimit
(
metafile
,
10
);
expect
(
Ok
,
stat
);
stat
=
GdipGetHemfFromMetafile
(
metafile
,
&
hemf
);
expect
(
InvalidParameter
,
stat
);
...
...
@@ -445,6 +462,9 @@ static void test_empty(void)
expect
(
WrongState
,
stat
);
expect
(
0xdeadbeef
,
limit_dpi
);
stat
=
GdipSetMetafileDownLevelRasterizationLimit
(
metafile
,
200
);
expect
(
WrongState
,
stat
);
check_metafile
(
metafile
,
empty_records
,
"empty metafile"
,
dst_points
,
&
frame
,
UnitPixel
);
sync_metafile
(
&
metafile
,
"empty.emf"
);
...
...
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