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
27480405
Commit
27480405
authored
Dec 26, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add test for size of metafiles loaded from streams.
parent
f8703910
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
image.c
dlls/gdiplus/tests/image.c
+50
-0
No files found.
dlls/gdiplus/tests/image.c
View file @
27480405
...
...
@@ -804,6 +804,55 @@ static void test_getrawformat(void)
test_bufferrawformat
((
void
*
)
wmfimage
,
sizeof
(
wmfimage
),
&
ImageFormatWMF
,
__LINE__
,
FALSE
);
}
static
void
test_loadwmf
(
void
)
{
LPSTREAM
stream
;
HGLOBAL
hglob
;
LPBYTE
data
;
HRESULT
hres
;
GpStatus
stat
;
GpImage
*
img
;
GpRectF
bounds
;
GpUnit
unit
;
REAL
res
=
12345
.
0
;
hglob
=
GlobalAlloc
(
0
,
sizeof
(
wmfimage
));
data
=
GlobalLock
(
hglob
);
memcpy
(
data
,
wmfimage
,
sizeof
(
wmfimage
));
GlobalUnlock
(
hglob
);
data
=
NULL
;
hres
=
CreateStreamOnHGlobal
(
hglob
,
TRUE
,
&
stream
);
ok
(
hres
==
S_OK
,
"Failed to create a stream
\n
"
);
if
(
hres
!=
S_OK
)
return
;
stat
=
GdipLoadImageFromStream
(
stream
,
&
img
);
ok
(
stat
==
Ok
,
"Failed to create a Bitmap
\n
"
);
if
(
stat
!=
Ok
){
IStream_Release
(
stream
);
return
;
}
IStream_Release
(
stream
);
stat
=
GdipGetImageBounds
(
img
,
&
bounds
,
&
unit
);
expect
(
Ok
,
stat
);
todo_wine
expect
(
UnitPixel
,
unit
);
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
0
.
0
,
bounds
.
Y
);
todo_wine
expectf
(
320
.
0
,
bounds
.
Width
);
todo_wine
expectf
(
320
.
0
,
bounds
.
Height
);
stat
=
GdipGetImageHorizontalResolution
(
img
,
&
res
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expectf
(
1440
.
0
,
res
);
stat
=
GdipGetImageVerticalResolution
(
img
,
&
res
);
todo_wine
expect
(
Ok
,
stat
);
todo_wine
expectf
(
1440
.
0
,
res
);
GdipDisposeImage
(
img
);
}
static
void
test_createhbitmap
(
void
)
{
GpStatus
stat
;
...
...
@@ -1378,6 +1427,7 @@ START_TEST(image)
test_testcontrol
();
test_fromhicon
();
test_getrawformat
();
test_loadwmf
();
test_createhbitmap
();
test_getsetpixel
();
test_palette
();
...
...
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