gdi32: Use DC_ATTR for GetCurrentPositionEx implementation.
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
340a445289
commit
531a599405
|
@ -1833,19 +1833,6 @@ BOOL WINAPI GetBrushOrgEx( HDC hdc, LPPOINT pt )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetCurrentPositionEx (GDI32.@)
|
||||
*/
|
||||
BOOL WINAPI GetCurrentPositionEx( HDC hdc, LPPOINT pt )
|
||||
{
|
||||
DC * dc = get_dc_ptr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
*pt = dc->attr->cur_pos;
|
||||
release_dc_ptr( dc );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetViewportExtEx (GDI32.@)
|
||||
*/
|
||||
|
|
|
@ -37,6 +37,17 @@ static DC_ATTR *get_dc_attr( HDC hdc )
|
|||
return dc_attr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetCurrentPositionEx (GDI32.@)
|
||||
*/
|
||||
BOOL WINAPI GetCurrentPositionEx( HDC hdc, POINT *point )
|
||||
{
|
||||
DC_ATTR *dc_attr;
|
||||
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
|
||||
*point = dc_attr->cur_pos;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* LineTo (GDI32.@)
|
||||
*/
|
||||
|
|
|
@ -3017,6 +3017,9 @@ static void test_metafile_file(void)
|
|||
ret = Ellipse(dc, 0, 0, 2, 2);
|
||||
ok( ret, "Ellipse error %d.\n", GetLastError());
|
||||
|
||||
ret = GetCurrentPositionEx(dc, &oldpoint);
|
||||
ok(!ret, "GetCurrentPositionEx succeeded\n");
|
||||
|
||||
size = GetFileSize(file, NULL);
|
||||
ok(!size, "size = %u\n", size);
|
||||
|
||||
|
|
Loading…
Reference in New Issue