Commit b2648b82 authored by Mikolaj Zalewski's avatar Mikolaj Zalewski Committed by Alexandre Julliard

oleaut32: olepicture: When drawing metafiles set the coordinates system so that…

oleaut32: olepicture: When drawing metafiles set the coordinates system so that it is drawn in the correct place.
parent 8e7e2c25
......@@ -694,8 +694,23 @@ static HRESULT WINAPI OLEPictureImpl_Render(IPicture *iface, HDC hdc,
break;
case PICTYPE_METAFILE:
PlayMetaFile(hdc, This->desc.u.wmf.hmeta);
{
POINT prevOrg;
SIZE prevExt;
int oldmode;
oldmode = SetMapMode(hdc, MM_ANISOTROPIC);
SetViewportOrgEx(hdc, x, y, &prevOrg);
SetViewportExtEx(hdc, cx, cy, &prevExt);
if (!PlayMetaFile(hdc, This->desc.u.wmf.hmeta))
ERR("PlayMetaFile failed!\n");
SetViewportExtEx(hdc, prevExt.cx, prevExt.cy, NULL);
SetViewportOrgEx(hdc, prevOrg.x, prevOrg.y, NULL);
SetMapMode(hdc, oldmode);
break;
}
case PICTYPE_ENHMETAFILE:
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment