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

in device coordinates in the metafile.
This commit is contained in:
Dave Belanger 2003-10-22 03:02:08 +00:00 committed by Alexandre Julliard
parent f388977f75
commit 46329e83f0
1 changed files with 8 additions and 5 deletions

View File

@ -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;
}