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
28e34588
Commit
28e34588
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: Implement GdipCreateHBITMAPFromBitmap.
parent
88bc3426
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
6 deletions
+64
-6
image.c
dlls/gdiplus/image.c
+61
-3
image.c
dlls/gdiplus/tests/image.c
+3
-3
No files found.
dlls/gdiplus/image.c
View file @
28e34588
...
...
@@ -447,11 +447,69 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE hInstance,
GpStatus
WINGDIPAPI
GdipCreateHBITMAPFromBitmap
(
GpBitmap
*
bitmap
,
HBITMAP
*
hbmReturn
,
ARGB
background
)
{
FIXME
(
"stub
\n
"
);
GpStatus
stat
;
HBITMAP
result
,
oldbitmap
;
UINT
width
,
height
;
HDC
hdc
;
GpGraphics
*
graphics
;
BITMAPINFOHEADER
bih
;
void
*
bits
;
TRACE
(
"(%p,%p,%x)
\n
"
,
bitmap
,
hbmReturn
,
background
);
if
(
!
bitmap
||
!
hbmReturn
)
return
InvalidParameter
;
GdipGetImageWidth
((
GpImage
*
)
bitmap
,
&
width
);
GdipGetImageHeight
((
GpImage
*
)
bitmap
,
&
height
);
bih
.
biSize
=
sizeof
(
bih
);
bih
.
biWidth
=
width
;
bih
.
biHeight
=
height
;
bih
.
biPlanes
=
1
;
bih
.
biBitCount
=
32
;
bih
.
biCompression
=
BI_RGB
;
bih
.
biSizeImage
=
0
;
bih
.
biXPelsPerMeter
=
0
;
bih
.
biYPelsPerMeter
=
0
;
bih
.
biClrUsed
=
0
;
bih
.
biClrImportant
=
0
;
hdc
=
CreateCompatibleDC
(
NULL
);
if
(
!
hdc
)
return
GenericError
;
result
=
CreateDIBSection
(
hdc
,
(
BITMAPINFO
*
)
&
bih
,
DIB_RGB_COLORS
,
&
bits
,
NULL
,
0
);
if
(
result
)
{
oldbitmap
=
SelectObject
(
hdc
,
result
);
stat
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
if
(
stat
==
Ok
)
{
stat
=
GdipGraphicsClear
(
graphics
,
background
);
if
(
hbmReturn
)
*
hbmReturn
=
NULL
;
if
(
stat
==
Ok
)
stat
=
GdipDrawImage
(
graphics
,
(
GpImage
*
)
bitmap
,
0
,
0
);
return
NotImplemented
;
GdipDeleteGraphics
(
graphics
);
}
SelectObject
(
hdc
,
oldbitmap
);
}
else
stat
=
GenericError
;
DeleteDC
(
hdc
);
if
(
stat
!=
Ok
&&
result
)
{
DeleteObject
(
result
);
result
=
NULL
;
}
*
hbmReturn
=
result
;
return
stat
;
}
GpStatus
WINGDIPAPI
GdipConvertToEmfPlus
(
const
GpGraphics
*
ref
,
...
...
dlls/gdiplus/tests/image.c
View file @
28e34588
...
...
@@ -760,14 +760,14 @@ static void test_createhbitmap(void)
/* test NULL values */
stat
=
GdipCreateHBITMAPFromBitmap
(
NULL
,
&
hbitmap
,
0
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipCreateHBITMAPFromBitmap
(
bitmap
,
NULL
,
0
);
todo_wine
expect
(
InvalidParameter
,
stat
);
expect
(
InvalidParameter
,
stat
);
/* create HBITMAP */
stat
=
GdipCreateHBITMAPFromBitmap
(
bitmap
,
&
hbitmap
,
0
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
if
(
stat
==
Ok
)
{
...
...
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