gdi32: Store stretch_blt_mode in DC_ATTR.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
84383245bb
commit
4198e0760b
|
@ -313,7 +313,7 @@ BOOL CDECL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
|||
((src->width != dst->width) || (src->height != dst->height)))
|
||||
{
|
||||
copy_bitmapinfo( src_info, dst_info );
|
||||
err = stretch_bits( src_info, src, dst_info, dst, &bits, dc_dst->stretchBltMode );
|
||||
err = stretch_bits( src_info, src, dst_info, dst, &bits, dc_dst->attr->stretch_blt_mode );
|
||||
if (!err) err = dst_dev->funcs->pPutImage( dst_dev, 0, dst_info, &bits, src, dst, rop );
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static void set_initial_dc_state( DC *dc )
|
|||
dc->font_code_page = CP_ACP;
|
||||
dc->attr->rop_mode = R2_COPYPEN;
|
||||
dc->attr->poly_fill_mode = ALTERNATE;
|
||||
dc->stretchBltMode = BLACKONWHITE;
|
||||
dc->attr->stretch_blt_mode = BLACKONWHITE;
|
||||
dc->attr->rel_abs_mode = ABSOLUTE;
|
||||
dc->attr->background_mode = OPAQUE;
|
||||
dc->attr->background_color = RGB( 255, 255, 255 );
|
||||
|
@ -466,7 +466,7 @@ BOOL CDECL nulldrv_RestoreDC( PHYSDEV dev, INT level )
|
|||
dc->attr->layout = dcs->attr->layout;
|
||||
dc->attr->rop_mode = dcs->attr->rop_mode;
|
||||
dc->attr->poly_fill_mode = dcs->attr->poly_fill_mode;
|
||||
dc->stretchBltMode = dcs->stretchBltMode;
|
||||
dc->attr->stretch_blt_mode = dcs->attr->stretch_blt_mode;
|
||||
dc->attr->rel_abs_mode = dcs->attr->rel_abs_mode;
|
||||
dc->attr->background_mode = dcs->attr->background_mode;
|
||||
dc->attr->background_color = dcs->attr->background_color;
|
||||
|
@ -1392,22 +1392,6 @@ UINT WINAPI SetBoundsRect(HDC hdc, const RECT* rect, UINT flags)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetStretchBltMode (GDI32.@)
|
||||
*/
|
||||
INT WINAPI GetStretchBltMode( HDC hdc )
|
||||
{
|
||||
INT ret = 0;
|
||||
DC * dc = get_dc_ptr( hdc );
|
||||
if (dc)
|
||||
{
|
||||
ret = dc->stretchBltMode;
|
||||
release_dc_ptr( dc );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetStretchBltMode (GDI32.@)
|
||||
*/
|
||||
|
@ -1427,8 +1411,8 @@ INT WINAPI SetStretchBltMode( HDC hdc, INT mode )
|
|||
mode = physdev->funcs->pSetStretchBltMode( physdev, mode );
|
||||
if (mode)
|
||||
{
|
||||
ret = dc->stretchBltMode;
|
||||
dc->stretchBltMode = mode;
|
||||
ret = dc->attr->stretch_blt_mode;
|
||||
dc->attr->stretch_blt_mode = mode;
|
||||
}
|
||||
release_dc_ptr( dc );
|
||||
}
|
||||
|
|
|
@ -592,7 +592,7 @@ INT CDECL nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst,
|
|||
if (err == ERROR_TRANSFORM_NOT_SUPPORTED)
|
||||
{
|
||||
copy_bitmapinfo( src_info, dst_info );
|
||||
err = stretch_bits( src_info, &src, dst_info, &dst, &src_bits, dc->stretchBltMode );
|
||||
err = stretch_bits( src_info, &src, dst_info, &dst, &src_bits, dc->attr->stretch_blt_mode );
|
||||
if (!err) err = dev->funcs->pPutImage( dev, NULL, dst_info, &src_bits, &src, &dst, rop );
|
||||
}
|
||||
if (err) ret = 0;
|
||||
|
|
|
@ -196,6 +196,15 @@ INT WINAPI SetPolyFillMode( HDC hdc, INT mode )
|
|||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetStretchBltMode (GDI32.@)
|
||||
*/
|
||||
INT WINAPI GetStretchBltMode( HDC hdc )
|
||||
{
|
||||
DC_ATTR *dc_attr = get_dc_attr( hdc );
|
||||
return dc_attr ? dc_attr->stretch_blt_mode : 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetCurrentPositionEx (GDI32.@)
|
||||
*/
|
||||
|
|
|
@ -116,7 +116,6 @@ typedef struct tagDC
|
|||
const struct font_gamma_ramp *font_gamma_ramp;
|
||||
|
||||
UINT font_code_page;
|
||||
WORD stretchBltMode;
|
||||
COLORREF dcBrushColor;
|
||||
COLORREF dcPenColor;
|
||||
POINT brush_org;
|
||||
|
|
|
@ -110,6 +110,7 @@ typedef struct DC_ATTR
|
|||
WORD poly_fill_mode;
|
||||
WORD rop_mode;
|
||||
WORD rel_abs_mode;
|
||||
WORD stretch_blt_mode;
|
||||
void *emf;
|
||||
} DC_ATTR;
|
||||
|
||||
|
|
Loading…
Reference in New Issue