gdi32: Use get_dc_attr in SetRelAbs.
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
90a7e79c11
commit
9e8a308f68
|
@ -1394,34 +1394,6 @@ UINT WINAPI SetBoundsRect(HDC hdc, const RECT* rect, UINT flags)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetRelAbs (GDI32.@)
|
||||
*/
|
||||
INT WINAPI SetRelAbs( HDC hdc, INT mode )
|
||||
{
|
||||
INT ret = 0;
|
||||
DC *dc;
|
||||
|
||||
if ((mode != ABSOLUTE) && (mode != RELATIVE))
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
if ((dc = get_dc_ptr( hdc )))
|
||||
{
|
||||
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetRelAbs );
|
||||
mode = physdev->funcs->pSetRelAbs( physdev, mode );
|
||||
if (mode)
|
||||
{
|
||||
ret = dc->attr->rel_abs_mode;
|
||||
dc->attr->rel_abs_mode = mode;
|
||||
}
|
||||
release_dc_ptr( dc );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetPolyFillMode (GDI32.@)
|
||||
*/
|
||||
|
|
|
@ -68,6 +68,7 @@ extern BOOL METADC_RoundRect( HDC hdc, INT left, INT top, INT right, INT bottom,
|
|||
INT ell_width, INT ell_height ) DECLSPEC_HIDDEN;
|
||||
extern BOOL METADC_SetBkMode( HDC hdc, INT mode ) DECLSPEC_HIDDEN;
|
||||
extern BOOL METADC_SetPixel( HDC hdc, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
extern BOOL METADC_SetRelAbs( HDC hdc, INT mode ) DECLSPEC_HIDDEN;
|
||||
extern BOOL METADC_SetROP2( HDC hdc, INT rop ) DECLSPEC_HIDDEN;
|
||||
extern BOOL METADC_SetTextAlign( HDC hdc, UINT align ) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -193,6 +193,27 @@ INT WINAPI GetRelAbs( HDC hdc, DWORD ignore )
|
|||
return dc_attr ? dc_attr->rel_abs_mode : 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetRelAbs (GDI32.@)
|
||||
*/
|
||||
INT WINAPI SetRelAbs( HDC hdc, INT mode )
|
||||
{
|
||||
DC_ATTR *dc_attr;
|
||||
INT ret;
|
||||
|
||||
if (mode != ABSOLUTE && mode != RELATIVE)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (is_meta_dc( hdc )) return METADC_SetRelAbs( hdc, mode );
|
||||
if (!(dc_attr = get_dc_attr( hdc ))) return 0;
|
||||
ret = dc_attr->rel_abs_mode;
|
||||
dc_attr->rel_abs_mode = mode;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetROP2 (GDI32.@)
|
||||
*/
|
||||
|
|
|
@ -55,9 +55,9 @@ BOOL METADC_SetROP2( HDC hdc, INT rop )
|
|||
return metadc_param1( hdc, META_SETROP2, (WORD)rop );
|
||||
}
|
||||
|
||||
INT CDECL MFDRV_SetRelAbs( PHYSDEV dev, INT mode )
|
||||
BOOL METADC_SetRelAbs( HDC hdc, INT mode )
|
||||
{
|
||||
return MFDRV_MetaParam1( dev, META_SETRELABS, (WORD)mode) ? mode : 0;
|
||||
return metadc_param1( hdc, META_SETRELABS, (WORD)mode );
|
||||
}
|
||||
|
||||
INT CDECL MFDRV_SetPolyFillMode( PHYSDEV dev, INT mode )
|
||||
|
|
|
@ -203,7 +203,7 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
|
|||
MFDRV_SetMapperFlags, /* pSetMapperFlags */
|
||||
NULL, /* pSetPixel */
|
||||
MFDRV_SetPolyFillMode, /* pSetPolyFillMode */
|
||||
MFDRV_SetRelAbs, /* pSetRelAbs */
|
||||
NULL, /* pSetRelAbs */
|
||||
MFDRV_SetStretchBltMode, /* pSetStretchBltMode */
|
||||
MFDRV_SetTextCharacterExtra, /* pSetTextCharacterExtra */
|
||||
MFDRV_SetTextColor, /* pSetTextColor */
|
||||
|
|
|
@ -112,7 +112,6 @@ extern DWORD CDECL MFDRV_SetLayout( PHYSDEV dev, DWORD layout ) DECLSPEC_HIDD
|
|||
extern INT CDECL MFDRV_SetMapMode( PHYSDEV dev, INT mode ) DECLSPEC_HIDDEN;
|
||||
extern DWORD CDECL MFDRV_SetMapperFlags( PHYSDEV dev, DWORD flags ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL MFDRV_SetPolyFillMode( PHYSDEV dev, INT mode ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL MFDRV_SetRelAbs( PHYSDEV dev, INT mode ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL MFDRV_SetStretchBltMode( PHYSDEV dev, INT mode ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL MFDRV_SetTextCharacterExtra( PHYSDEV dev, INT extra ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF CDECL MFDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue