[PATCH 4/4] riched20: Don't scale the picture size with dpi.
Huw Davies
huw at codeweavers.com
Thu Sep 14 06:51:04 CDT 2017
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
dlls/riched20/richole.c | 23 ++++++++++-------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 0a8a32a69a..120bcf8190 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -5294,6 +5294,7 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run, BOOL selected)
SIZE sz;
BOOL has_size;
HBITMAP old_bm;
+ RECT rc;
assert(run->nFlags & MERF_GRAPHICS);
assert(run->ole_obj);
@@ -5331,8 +5332,8 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run, BOOL selected)
{
convert_sizel(c, &run->ole_obj->sizel, &sz);
} else {
- sz.cx = MulDiv(dibsect.dsBm.bmWidth, c->dpi.cx, 96);
- sz.cy = MulDiv(dibsect.dsBm.bmHeight, c->dpi.cy, 96);
+ sz.cx = dibsect.dsBm.bmWidth;
+ sz.cy = dibsect.dsBm.bmHeight;
}
if (c->editor->nZoomNumerator != 0)
{
@@ -5351,8 +5352,8 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run, BOOL selected)
{
convert_sizel(c, &run->ole_obj->sizel, &sz);
} else {
- sz.cy = MulDiv(emh.rclBounds.bottom - emh.rclBounds.top, c->dpi.cx, 96);
- sz.cx = MulDiv(emh.rclBounds.right - emh.rclBounds.left, c->dpi.cy, 96);
+ sz.cx = emh.rclBounds.right - emh.rclBounds.left;
+ sz.cy = emh.rclBounds.bottom - emh.rclBounds.top;
}
if (c->editor->nZoomNumerator != 0)
{
@@ -5360,15 +5361,11 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run, BOOL selected)
sz.cy = MulDiv(sz.cy, c->editor->nZoomNumerator, c->editor->nZoomDenominator);
}
- {
- RECT rc;
-
- rc.left = x;
- rc.top = y - sz.cy;
- rc.right = x + sz.cx;
- rc.bottom = y;
- PlayEnhMetaFile(c->hDC, stgm.u.hEnhMetaFile, &rc);
- }
+ rc.left = x;
+ rc.top = y - sz.cy;
+ rc.right = x + sz.cx;
+ rc.bottom = y;
+ PlayEnhMetaFile(c->hDC, stgm.u.hEnhMetaFile, &rc);
break;
default:
FIXME("Unsupported tymed %d\n", stgm.tymed);
--
2.12.0
More information about the wine-patches
mailing list