gdi32: Introduce NtGdiCreateBitmap.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
505a6b9cff
commit
270f7bed60
|
@ -91,11 +91,11 @@ HBITMAP WINAPI CreateCompatibleBitmap( HDC hdc, INT width, INT height)
|
|||
|
||||
|
||||
/******************************************************************************
|
||||
* CreateBitmap [GDI32.@]
|
||||
* NtGdiCreateBitmap (win32u.@)
|
||||
*
|
||||
* Creates a bitmap with the specified info.
|
||||
*/
|
||||
HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
|
||||
HBITMAP WINAPI NtGdiCreateBitmap( INT width, INT height, UINT planes,
|
||||
UINT bpp, const void *bits )
|
||||
{
|
||||
BITMAPOBJ *bmpobj;
|
||||
|
@ -110,7 +110,7 @@ HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
|
|||
}
|
||||
|
||||
if (!width || !height)
|
||||
return GetStockObject( DEFAULT_BITMAP );
|
||||
return 0;
|
||||
|
||||
if (height < 0)
|
||||
height = -height;
|
||||
|
|
|
@ -201,3 +201,17 @@ HBITMAP WINAPI CreateBitmapIndirect( const BITMAP *bmp )
|
|||
return CreateBitmap( bmp->bmWidth, bmp->bmHeight, bmp->bmPlanes,
|
||||
bmp->bmBitsPixel, bmp->bmBits );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* CreateBitmap (GDI32.@)
|
||||
*
|
||||
* Creates a bitmap with the specified info.
|
||||
*/
|
||||
HBITMAP WINAPI CreateBitmap( INT width, INT height, UINT planes,
|
||||
UINT bpp, const void *bits )
|
||||
{
|
||||
if (!width || !height)
|
||||
return GetStockObject( STOCK_LAST + 1 ); /* default 1x1 bitmap */
|
||||
|
||||
return NtGdiCreateBitmap( width, height, planes, bpp, bits );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue