gdi32: Use NtGdiCreateDIBBrush for CreateDIBPatternBrushPt.

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:
Jacek Caban 2021-08-25 13:39:52 +01:00 committed by Alexandre Julliard
parent 99367b66e6
commit 48d586b782
3 changed files with 16 additions and 6 deletions

View file

@ -245,20 +245,21 @@ HBRUSH WINAPI CreateDIBPatternBrush( HGLOBAL hbitmap, UINT coloruse )
/***********************************************************************
* CreateDIBPatternBrushPt (GDI32.@)
* NtGdiCreateDIBBrush (win32u.@)
*
* Create a logical brush with a pattern from a DIB.
*/
HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse )
HBRUSH WINAPI NtGdiCreateDIBBrush( const void *data, UINT coloruse, UINT size,
BOOL is_8x8, BOOL pen, const void *client )
{
const BITMAPINFO *info=data;
const BITMAPINFO *info = data;
LOGBRUSH logbrush;
if (!data)
return NULL;
TRACE("%p %dx%d %dbpp\n", info, info->bmiHeader.biWidth,
info->bmiHeader.biHeight, info->bmiHeader.biBitCount);
TRACE( "%p %dx%d %dbpp\n", info, info->bmiHeader.biWidth,
info->bmiHeader.biHeight, info->bmiHeader.biBitCount );
logbrush.lbStyle = BS_DIBPATTERNPT;
logbrush.lbColor = coloruse;

View file

@ -448,6 +448,14 @@ HBRUSH WINAPI CreatePatternBrush( HBITMAP bitmap )
return NtGdiCreatePatternBrushInternal( bitmap, FALSE, FALSE );
}
/***********************************************************************
* CreateDIBPatternBrushPt (GDI32.@)
*/
HBRUSH WINAPI CreateDIBPatternBrushPt( const void *data, UINT coloruse )
{
return NtGdiCreateDIBBrush( data, coloruse, /* FIXME */ 0, FALSE, FALSE, data );
}
/***********************************************************************
* CreateBitmapIndirect (GDI32.@)
*/

View file

@ -195,7 +195,8 @@ HANDLE WINAPI NtGdiCreateClientObj( ULONG type );
HFONT WINAPI NtGdiHfontCreate( const ENUMLOGFONTEXDVW *enumex, ULONG unk2, ULONG unk3,
ULONG unk4, void *data );
HDC WINAPI NtGdiCreateCompatibleDC( HDC hdc );
HBRUSH WINAPI NtGdiCreateDIBBrush( const void* data, UINT coloruse );
HBRUSH WINAPI NtGdiCreateDIBBrush( const void *data, UINT coloruse, UINT size,
BOOL is_8x8, BOOL pen, const void *client );
HRGN WINAPI NtGdiCreateEllipticRgn( INT left, INT top, INT right, INT bottom );
HBRUSH WINAPI NtGdiCreateHatchBrush( INT style, COLORREF color, BOOL pen );
HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP hbitmap, BOOL pen, BOOL is_8x8 );