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
6c061964
Commit
6c061964
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: Implement GdipGetMetafileDownLevelRasterizationLimit.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
11af7a02
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
1 deletion
+50
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
metafile.c
dlls/gdiplus/metafile.c
+22
-0
metafile.c
dlls/gdiplus/tests/metafile.c
+25
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
6c061964
...
...
@@ -298,7 +298,7 @@
298 stdcall GdipGetLogFontA(ptr ptr ptr)
299 stdcall GdipGetLogFontW(ptr ptr ptr)
300 stdcall GdipGetMatrixElements(ptr ptr)
301 st
ub GdipGetMetafileDownLevelRasterizationLimit
301 st
dcall GdipGetMetafileDownLevelRasterizationLimit(ptr ptr)
302 stdcall GdipGetMetafileHeaderFromEmf(ptr ptr)
303 stdcall GdipGetMetafileHeaderFromFile(wstr ptr)
304 stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
6c061964
...
...
@@ -407,6 +407,7 @@ struct GpMetafile{
BOOL
auto_frame
;
/* If true, determine the frame automatically */
GpPointF
auto_frame_min
,
auto_frame_max
;
DWORD
next_object_id
;
UINT
limit_dpi
;
/* playback */
GpGraphics
*
playback_graphics
;
...
...
dlls/gdiplus/metafile.c
View file @
6c061964
...
...
@@ -810,6 +810,7 @@ GpStatus WINGDIPAPI GdipRecordMetafile(HDC hdc, EmfType type, GDIPCONST GpRectF
(
*
metafile
)
->
comment_data
=
NULL
;
(
*
metafile
)
->
comment_data_size
=
0
;
(
*
metafile
)
->
comment_data_length
=
0
;
(
*
metafile
)
->
limit_dpi
=
96
;
(
*
metafile
)
->
hemf
=
NULL
;
list_init
(
&
(
*
metafile
)
->
containers
);
...
...
@@ -4006,11 +4007,32 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream *stream,
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetMetafileDownLevelRasterizationLimit
(
GDIPCONST
GpMetafile
*
metafile
,
UINT
*
limitDpi
)
{
TRACE
(
"(%p,%p)
\n
"
,
metafile
,
limitDpi
);
if
(
!
metafile
||
!
limitDpi
)
return
InvalidParameter
;
if
(
!
metafile
->
record_dc
)
return
WrongState
;
*
limitDpi
=
metafile
->
limit_dpi
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetMetafileDownLevelRasterizationLimit
(
GpMetafile
*
metafile
,
UINT
limitDpi
)
{
TRACE
(
"(%p,%u)
\n
"
,
metafile
,
limitDpi
);
if
(
!
metafile
)
return
InvalidParameter
;
metafile
->
limit_dpi
=
limitDpi
;
return
Ok
;
}
...
...
dlls/gdiplus/tests/metafile.c
View file @
6c061964
...
...
@@ -379,6 +379,7 @@ static void test_empty(void)
static
const
GpRectF
frame
=
{
0
.
0
,
0
.
0
,
100
.
0
,
100
.
0
};
static
const
GpPointF
dst_points
[
3
]
=
{{
0
.
0
,
0
.
0
},{
100
.
0
,
0
.
0
},{
0
.
0
,
100
.
0
}};
static
const
WCHAR
description
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
't'
,
'e'
,
's'
,
't'
,
0
};
UINT
limit_dpi
;
hdc
=
CreateCompatibleDC
(
0
);
...
...
@@ -408,6 +409,25 @@ static void test_empty(void)
if
(
stat
!=
Ok
)
return
;
stat
=
GdipGetMetafileDownLevelRasterizationLimit
(
metafile
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetMetafileDownLevelRasterizationLimit
(
NULL
,
&
limit_dpi
);
expect
(
InvalidParameter
,
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
,
255
);
expect
(
Ok
,
stat
);
limit_dpi
=
0xdeadbeef
;
stat
=
GdipGetMetafileDownLevelRasterizationLimit
(
metafile
,
&
limit_dpi
);
expect
(
Ok
,
stat
);
ok
(
limit_dpi
==
255
,
"limit_dpi was %d
\n
"
,
limit_dpi
);
stat
=
GdipGetHemfFromMetafile
(
metafile
,
&
hemf
);
expect
(
InvalidParameter
,
stat
);
...
...
@@ -420,6 +440,11 @@ static void test_empty(void)
stat
=
GdipDeleteGraphics
(
graphics
);
expect
(
Ok
,
stat
);
limit_dpi
=
0xdeadbeef
;
stat
=
GdipGetMetafileDownLevelRasterizationLimit
(
metafile
,
&
limit_dpi
);
expect
(
WrongState
,
stat
);
expect
(
0xdeadbeef
,
limit_dpi
);
check_metafile
(
metafile
,
empty_records
,
"empty metafile"
,
dst_points
,
&
frame
,
UnitPixel
);
sync_metafile
(
&
metafile
,
"empty.emf"
);
...
...
include/gdiplusflat.h
View file @
6c061964
...
...
@@ -545,6 +545,7 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromWmfFile(GDIPCONST WCHAR*, GDIPCONST Wm
GpMetafile
**
);
GpStatus
WINGDIPAPI
GdipCreateMetafileFromFile
(
GDIPCONST
WCHAR
*
,
GpMetafile
**
);
GpStatus
WINGDIPAPI
GdipCreateMetafileFromStream
(
IStream
*
,
GpMetafile
**
);
GpStatus
WINGDIPAPI
GdipGetMetafileDownLevelRasterizationLimit
(
GDIPCONST
GpMetafile
*
,
UINT
*
);
GpStatus
WINGDIPAPI
GdipGetHemfFromMetafile
(
GpMetafile
*
,
HENHMETAFILE
*
);
GpStatus
WINGDIPAPI
GdipPlayMetafileRecord
(
GDIPCONST
GpMetafile
*
,
EmfPlusRecordType
,
UINT
,
UINT
,
GDIPCONST
BYTE
*
);
GpStatus
WINGDIPAPI
GdipSetMetafileDownLevelRasterizationLimit
(
GpMetafile
*
,
UINT
);
...
...
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