From 0a837f59a234c12ddabfafe572fe5270838ce863 Mon Sep 17 00:00:00 2001 From: Ian Macphail Date: Thu, 11 May 2017 16:17:15 +0100 Subject: [PATCH 1/2] [[ Bug 18939 ]] Draw player snapshot image at correct scale on hi-dpi displays. --- engine/src/player-platform.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/src/player-platform.cpp b/engine/src/player-platform.cpp index d271ea26191..7d78854313c 100644 --- a/engine/src/player-platform.cpp +++ b/engine/src/player-platform.cpp @@ -2355,8 +2355,14 @@ void MCPlayer::draw(MCDC *dc, const MCRectangle& p_dirty, bool p_isolated, bool MCGImageCreateWithRaster(t_raster, t_image.image); else MCGImageCreateWithRasterNoCopy(t_raster, t_image.image); + if (t_image . image != nil) + { + // IM-2017-05-11: [[ Bug 18939 ]] Set x/y scales for image, which may be scaled. + t_image.x_scale = MCGFloat(MCGImageGetWidth(t_image.image)) / MCGFloat(trect.width); + t_image.y_scale = MCGFloat(MCGImageGetHeight(t_image.image)) / MCGFloat(trect.height); dc -> drawimage(t_image, 0, 0, trect.width, trect.height, trect.x, trect.y); + } MCGImageRelease(t_image.image); MCPlatformUnlockPlayerBitmap(m_platform_player, t_bitmap); From 7457024d0da49151d9bda3e39451d309fd6da7be Mon Sep 17 00:00:00 2001 From: Ian Macphail Date: Thu, 11 May 2017 16:18:18 +0100 Subject: [PATCH 2/2] [[ Bug 18939 ]] Add release note. --- docs/notes/bugfix-18939.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/notes/bugfix-18939.md diff --git a/docs/notes/bugfix-18939.md b/docs/notes/bugfix-18939.md new file mode 100644 index 00000000000..8a88c52c97d --- /dev/null +++ b/docs/notes/bugfix-18939.md @@ -0,0 +1 @@ +# Fix player image incorrectly scaled in edit mode