diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index d2b3de23a69..ed011fc684e 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -222,7 +222,7 @@ static DWORD blend_bits( const BITMAPINFO *src_info, const struct gdi_image_bits } /* helper to retrieve either both colors or only the background color for monochrome blits */ -static void get_mono_dc_colors( HDC hdc, BITMAPINFO *info, int count ) +void get_mono_dc_colors( HDC hdc, BITMAPINFO *info, int count ) { RGBQUAD *colors = info->bmiColors; COLORREF color = GetBkColor( hdc ); diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index ad2bf4f2d90..c3009a22911 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -581,14 +581,7 @@ INT nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT he if (dst_info->bmiHeader.biBitCount == 1 && !dst_colors) { if (src_info->bmiHeader.biBitCount > 1) - { - COLORREF color = GetBkColor( dev->hdc ); - dst_info->bmiColors[0].rgbRed = GetRValue( color ); - dst_info->bmiColors[0].rgbGreen = GetGValue( color ); - dst_info->bmiColors[0].rgbBlue = GetBValue( color ); - dst_info->bmiColors[0].rgbReserved = 0; - dst_info->bmiHeader.biClrUsed = 1; - } + get_mono_dc_colors( dev->hdc, dst_info, 1 ); else { memcpy( dst_info->bmiColors, src_info->bmiColors, 2 * sizeof(dst_info->bmiColors[0]) ); diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 79a7a7435a5..8bdf9f12698 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -205,6 +205,7 @@ extern BOOL intersect_vis_rectangles( struct bitblt_coords *dst, struct bitblt_c extern DWORD stretch_bits( const BITMAPINFO *src_info, struct bitblt_coords *src, BITMAPINFO *dst_info, struct bitblt_coords *dst, struct gdi_image_bits *bits, int mode ) DECLSPEC_HIDDEN; +extern void get_mono_dc_colors( HDC hdc, BITMAPINFO *info, int count ) DECLSPEC_HIDDEN; /* brush.c */ extern BOOL store_brush_pattern( LOGBRUSH *brush, struct brush_pattern *pattern ) DECLSPEC_HIDDEN;