gdi32: Use NtGdiCreatePatternBrushInternal for CreatePatternBrush.

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:51 +01:00 committed by Alexandre Julliard
parent e0877b84a6
commit 99367b66e6
3 changed files with 14 additions and 5 deletions

View file

@ -209,16 +209,17 @@ HBRUSH WINAPI NtGdiCreateHatchBrush( INT style, COLORREF color, BOOL pen )
/*********************************************************************** /***********************************************************************
* CreatePatternBrush (GDI32.@) * NtGdiCreatePatternBrushInternal (win32u.@)
* *
* Create a logical brush with a pattern from a bitmap. * Create a logical brush with a pattern from a bitmap.
*/ */
HBRUSH WINAPI CreatePatternBrush( HBITMAP hbitmap ) HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP bitmap, BOOL pen, BOOL is_8x8 )
{ {
LOGBRUSH logbrush = { BS_PATTERN, 0, 0 }; LOGBRUSH logbrush = { BS_PATTERN, 0, 0 };
TRACE("%p\n", hbitmap );
logbrush.lbHatch = (ULONG_PTR)hbitmap; TRACE( "%p\n", bitmap );
logbrush.lbHatch = (ULONG_PTR)bitmap;
return create_brush( &logbrush ); return create_brush( &logbrush );
} }

View file

@ -440,6 +440,14 @@ HBRUSH WINAPI CreateHatchBrush( INT style, COLORREF color )
return NtGdiCreateHatchBrush( style, color, FALSE ); return NtGdiCreateHatchBrush( style, color, FALSE );
} }
/***********************************************************************
* CreatePatternBrush (GDI32.@)
*/
HBRUSH WINAPI CreatePatternBrush( HBITMAP bitmap )
{
return NtGdiCreatePatternBrushInternal( bitmap, FALSE, FALSE );
}
/*********************************************************************** /***********************************************************************
* CreateBitmapIndirect (GDI32.@) * CreateBitmapIndirect (GDI32.@)
*/ */

View file

@ -198,7 +198,7 @@ HDC WINAPI NtGdiCreateCompatibleDC( HDC hdc );
HBRUSH WINAPI NtGdiCreateDIBBrush( const void* data, UINT coloruse ); HBRUSH WINAPI NtGdiCreateDIBBrush( const void* data, UINT coloruse );
HRGN WINAPI NtGdiCreateEllipticRgn( INT left, INT top, INT right, INT bottom ); HRGN WINAPI NtGdiCreateEllipticRgn( INT left, INT top, INT right, INT bottom );
HBRUSH WINAPI NtGdiCreateHatchBrush( INT style, COLORREF color, BOOL pen ); HBRUSH WINAPI NtGdiCreateHatchBrush( INT style, COLORREF color, BOOL pen );
HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP hbitmap, BOOL pen ); HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP hbitmap, BOOL pen, BOOL is_8x8 );
HPEN WINAPI NtGdiCreatePen( INT style, INT width, COLORREF color, HBRUSH brush ); HPEN WINAPI NtGdiCreatePen( INT style, INT width, COLORREF color, HBRUSH brush );
HRGN WINAPI NtGdiCreateRectRgn( INT left, INT top, INT right, INT bottom ); HRGN WINAPI NtGdiCreateRectRgn( INT left, INT top, INT right, INT bottom );
HRGN WINAPI NtGdiCreateRoundRectRgn( INT left, INT top, INT right, INT bottom, HRGN WINAPI NtGdiCreateRoundRectRgn( INT left, INT top, INT right, INT bottom,