Fix EMF driver UpdateBBox routine. The EMF bounding box must be stored
in device coordinates in the metafile.
This commit is contained in:
parent
f388977f75
commit
46329e83f0
|
@ -207,15 +207,18 @@ void EMFDRV_UpdateBBox( PHYSDEV dev, RECTL *rect )
|
||||||
{
|
{
|
||||||
EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE *)dev;
|
EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE *)dev;
|
||||||
RECTL *bounds = &physDev->emh->rclBounds;
|
RECTL *bounds = &physDev->emh->rclBounds;
|
||||||
|
RECTL vportRect = *rect;
|
||||||
|
|
||||||
|
LPtoDP(physDev->hdc, (LPPOINT)&vportRect, 2);
|
||||||
|
|
||||||
if(bounds->left > bounds->right) {/* first rect */
|
if(bounds->left > bounds->right) {/* first rect */
|
||||||
*bounds = *rect;
|
*bounds = vportRect;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bounds->left = min(bounds->left, rect->left);
|
bounds->left = min(bounds->left, vportRect.left);
|
||||||
bounds->top = min(bounds->top, rect->top);
|
bounds->top = min(bounds->top, vportRect.top);
|
||||||
bounds->right = max(bounds->right, rect->right);
|
bounds->right = max(bounds->right, vportRect.right);
|
||||||
bounds->bottom = max(bounds->bottom, rect->bottom);
|
bounds->bottom = max(bounds->bottom, vportRect.bottom);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue