Commit f5bffe0e authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32: Use the get_mono_dc_colors() helper.

parent 1ca4fc09
......@@ -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 );
......
......@@ -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]) );
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment