gdi32: Use the get_mono_dc_colors() helper.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1ca4fc0943
commit
f5bffe0ef7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue