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
88bc3426
Commit
88bc3426
authored
Aug 27, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add test for GdipCreateHBITMAPFromBitmap.
parent
e7d14d02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
image.c
dlls/gdiplus/tests/image.c
+59
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/tests/image.c
View file @
88bc3426
...
...
@@ -741,6 +741,64 @@ static void test_getrawformat(void)
test_bufferrawformat
((
void
*
)
jpgimage
,
sizeof
(
jpgimage
),
&
ImageFormatJPEG
,
__LINE__
,
TRUE
);
}
static
void
test_createhbitmap
(
void
)
{
GpStatus
stat
;
GpBitmap
*
bitmap
;
HBITMAP
hbitmap
,
oldhbitmap
;
BITMAP
bm
;
int
ret
;
HDC
hdc
;
COLORREF
pixel
;
BYTE
bits
[
640
];
memset
(
bits
,
0x68
,
640
);
/* create Bitmap */
stat
=
GdipCreateBitmapFromScan0
(
10
,
20
,
32
,
PixelFormat24bppRGB
,
bits
,
&
bitmap
);
expect
(
Ok
,
stat
);
/* test NULL values */
stat
=
GdipCreateHBITMAPFromBitmap
(
NULL
,
&
hbitmap
,
0
);
todo_wine
expect
(
InvalidParameter
,
stat
);
stat
=
GdipCreateHBITMAPFromBitmap
(
bitmap
,
NULL
,
0
);
todo_wine
expect
(
InvalidParameter
,
stat
);
/* create HBITMAP */
stat
=
GdipCreateHBITMAPFromBitmap
(
bitmap
,
&
hbitmap
,
0
);
todo_wine
expect
(
Ok
,
stat
);
if
(
stat
==
Ok
)
{
ret
=
GetObjectA
(
hbitmap
,
sizeof
(
BITMAP
),
&
bm
);
expect
(
sizeof
(
BITMAP
),
ret
);
expect
(
0
,
bm
.
bmType
);
expect
(
10
,
bm
.
bmWidth
);
expect
(
20
,
bm
.
bmHeight
);
expect
(
40
,
bm
.
bmWidthBytes
);
expect
(
1
,
bm
.
bmPlanes
);
expect
(
32
,
bm
.
bmBitsPixel
);
ok
(
bm
.
bmBits
!=
NULL
,
"got DDB, expected DIB
\n
"
);
hdc
=
CreateCompatibleDC
(
NULL
);
oldhbitmap
=
SelectObject
(
hdc
,
hbitmap
);
pixel
=
GetPixel
(
hdc
,
5
,
5
);
SelectObject
(
hdc
,
oldhbitmap
);
DeleteDC
(
hdc
);
expect
(
0x686868
,
pixel
);
DeleteObject
(
hbitmap
);
}
stat
=
GdipDisposeImage
((
GpImage
*
)
bitmap
);
expect
(
Ok
,
stat
);
}
START_TEST
(
image
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -766,6 +824,7 @@ START_TEST(image)
test_testcontrol
();
test_fromhicon
();
test_getrawformat
();
test_createhbitmap
();
GdiplusShutdown
(
gdiplusToken
);
}
include/gdiplusflat.h
View file @
88bc3426
...
...
@@ -59,6 +59,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT,INT,INT,PixelFormat,BYTE*,
GpBitmap
**
);
GpStatus
WINGDIPAPI
GdipCreateBitmapFromStream
(
IStream
*
,
GpBitmap
**
);
GpStatus
WINGDIPAPI
GdipCreateBitmapFromStreamICM
(
IStream
*
,
GpBitmap
**
);
GpStatus
WINGDIPAPI
GdipCreateHBITMAPFromBitmap
(
GpBitmap
*
,
HBITMAP
*
,
ARGB
);
GpStatus
WINGDIPAPI
GdipCreateHICONFromBitmap
(
GpBitmap
*
,
HICON
*
);
GpStatus
WINGDIPAPI
GdipDeleteEffect
(
CGpEffect
*
);
...
...
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