Commit 46329e83 authored by Dave Belanger's avatar Dave Belanger Committed by Alexandre Julliard

Fix EMF driver UpdateBBox routine. The EMF bounding box must be stored

in device coordinates in the metafile.
parent f388977f
......@@ -207,15 +207,18 @@ void EMFDRV_UpdateBBox( PHYSDEV dev, RECTL *rect )
{
EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE *)dev;
RECTL *bounds = &physDev->emh->rclBounds;
RECTL vportRect = *rect;
LPtoDP(physDev->hdc, (LPPOINT)&vportRect, 2);
if(bounds->left > bounds->right) {/* first rect */
*bounds = *rect;
*bounds = vportRect;
return;
}
bounds->left = min(bounds->left, rect->left);
bounds->top = min(bounds->top, rect->top);
bounds->right = max(bounds->right, rect->right);
bounds->bottom = max(bounds->bottom, rect->bottom);
bounds->left = min(bounds->left, vportRect.left);
bounds->top = min(bounds->top, vportRect.top);
bounds->right = max(bounds->right, vportRect.right);
bounds->bottom = max(bounds->bottom, vportRect.bottom);
return;
}
......
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