gdi32: Use get_dc_attr in SetMiterLimit.

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:
Jacek Caban 2021-07-30 13:01:11 +02:00 committed by Alexandre Julliard
parent 06dd790c45
commit a6400cfbcb
2 changed files with 13 additions and 24 deletions

View file

@ -1538,30 +1538,6 @@ BOOL WINAPI CancelDC(HDC hdc)
return TRUE;
}
/*******************************************************************
* SetMiterLimit [GDI32.@]
*
*
*/
BOOL WINAPI SetMiterLimit(HDC hdc, FLOAT eNewLimit, PFLOAT peOldLimit)
{
BOOL bRet = FALSE;
DC *dc;
TRACE("(%p,%f,%p)\n", hdc, eNewLimit, peOldLimit);
dc = get_dc_ptr( hdc );
if (dc)
{
if (peOldLimit)
*peOldLimit = dc->attr->miter_limit;
dc->attr->miter_limit = eNewLimit;
release_dc_ptr( dc );
bRet = TRUE;
}
return bRet;
}
/*******************************************************************
* GdiIsMetaPrintDC [GDI32.@]
*/

View file

@ -339,6 +339,19 @@ BOOL WINAPI GetMiterLimit( HDC hdc, FLOAT *limit )
return TRUE;
}
/*******************************************************************
* SetMiterLimit (GDI32.@)
*/
BOOL WINAPI SetMiterLimit( HDC hdc, FLOAT limit, FLOAT *old_limit )
{
DC_ATTR *dc_attr;
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
/* FIXME: record EMFs */
if (old_limit) *old_limit = dc_attr->miter_limit;
dc_attr->miter_limit = limit;
return TRUE;
}
/***********************************************************************
* SetPixel (GDI32.@)
*/