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 | 20 -------------------- dlls/gdi32/objects.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/dlls/gdi32/brush.c b/dlls/gdi32/brush.c index 5868824dd8f..1dcf4b2c844 100644 --- a/dlls/gdi32/brush.c +++ b/dlls/gdi32/brush.c @@ -224,26 +224,6 @@ HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP bitmap, BOOL pen, BOOL is }
-/*********************************************************************** - * CreateDIBPatternBrush (GDI32.@) - * - * Create a logical brush with a pattern from a DIB. - */ -HBRUSH WINAPI CreateDIBPatternBrush( HGLOBAL hbitmap, UINT coloruse ) -{ - LOGBRUSH logbrush; - - TRACE("%p\n", hbitmap ); - - logbrush.lbStyle = BS_DIBPATTERN; - logbrush.lbColor = coloruse; - - logbrush.lbHatch = (ULONG_PTR)hbitmap; - - return create_brush( &logbrush ); -} - - /*********************************************************************** * NtGdiCreateDIBBrush (win32u.@) * diff --git a/dlls/gdi32/objects.c b/dlls/gdi32/objects.c index 9f43f1505e8..e5aa641edf3 100644 --- a/dlls/gdi32/objects.c +++ b/dlls/gdi32/objects.c @@ -448,6 +448,22 @@ HBRUSH WINAPI CreatePatternBrush( HBITMAP bitmap ) return NtGdiCreatePatternBrushInternal( bitmap, FALSE, FALSE ); }
+/*********************************************************************** + * CreateDIBPatternBrush (GDI32.@) + */ +HBRUSH WINAPI CreateDIBPatternBrush( HGLOBAL hbitmap, UINT coloruse ) +{ + HBRUSH brush; + void *mem; + + TRACE( "%p\n", hbitmap ); + + if (!(mem = GlobalLock( hbitmap ))) return 0; + brush = NtGdiCreateDIBBrush( mem, coloruse, /* FIXME */ 0, FALSE, FALSE, hbitmap ); + GlobalUnlock( hbitmap ); + return brush; +} + /*********************************************************************** * CreateDIBPatternBrushPt (GDI32.@) */