From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/gdi32/brush.c | 9 +++++---- dlls/gdi32/objects.c | 8 ++++++++ include/ntgdi.h | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index 408d93b2167..c723b7c842f 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -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. */ -HBRUSH WINAPI CreatePatternBrush( HBITMAP hbitmap ) +HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP bitmap, BOOL pen, BOOL is_8x8 ) { 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 ); }
diff --git a/dlls/gdi32/objects.c b/dlls/gdi32/objects.c index 80f7454c2cb..6981eea72d0 100644 --- a/dlls/gdi32/objects.c +++ b/dlls/gdi32/objects.c @@ -440,6 +440,14 @@ HBRUSH WINAPI CreateHatchBrush( INT style, COLORREF color ) return NtGdiCreateHatchBrush( style, color, FALSE ); }
+/*********************************************************************** + * CreatePatternBrush (GDI32.@) + */ +HBRUSH WINAPI CreatePatternBrush( HBITMAP bitmap ) +{ + return NtGdiCreatePatternBrushInternal( bitmap, FALSE, FALSE ); +} + /*********************************************************************** * CreateBitmapIndirect (GDI32.@) */ diff --git a/include/ntgdi.h b/include/ntgdi.h index a7936561b23..928d1cec505 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -198,7 +198,7 @@ HDC WINAPI NtGdiCreateCompatibleDC( HDC hdc ); HBRUSH WINAPI NtGdiCreateDIBBrush( const void* data, UINT coloruse ); 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 ); +HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP hbitmap, BOOL pen, BOOL is_8x8 ); HPEN WINAPI NtGdiCreatePen( INT style, INT width, COLORREF color, HBRUSH brush ); HRGN WINAPI NtGdiCreateRectRgn( INT left, INT top, INT right, INT bottom ); HRGN WINAPI NtGdiCreateRoundRectRgn( INT left, INT top, INT right, INT bottom,