Module: wine Branch: master Commit: 7020f47e0d4e1f78457d007c7c8b2207e76dd81e URL: http://source.winehq.org/git/wine.git/?a=commit;h=7020f47e0d4e1f78457d007c7c...
Author: Huw Davies huw@codeweavers.com Date: Thu Sep 14 12:51:04 2017 +0100
riched20: Don't scale the picture size with dpi.
Signed-off-by: Huw Davies huw@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 0a8a32a..120bcf8 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);