diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-04-15 15:23:57 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-04-16 13:42:28 +0200 |
commit | 2ef36289c78f4eb1ed25b5cf3913c441760aa111 (patch) | |
tree | eade3662ee72062dad5ed9ba0dc0d4d2bd847874 /vcl/opengl | |
parent | 81435598545d98fbc082df11810e766590bbc856 (diff) |
round() instead of truncating in two-pass OpenGL area scaling
BitmapTest::testScale2() on Linux fails for me without this,
as the two-pass setup higher truncates the size to integers, and
truncating here again sets the final size as 64 instead of the expected 65
Change-Id: I54748e29f0e0ca63539e42009759a93d6a5d6be2
Reviewed-on: https://gerrit.libreoffice.org/70779
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/opengl')
-rw-r--r-- | vcl/opengl/scale.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx index ae7146b6d6bf..2feaa183d25f 100644 --- a/vcl/opengl/scale.cxx +++ b/vcl/opengl/scale.cxx @@ -284,8 +284,8 @@ bool OpenGLSalBitmap::ImplScaleArea( const rtl::Reference< OpenGLContext > &xCon mnWidth = nNewWidth; mnHeight = nNewHeight; - nNewWidth = int(mnWidth * rScaleX); - nNewHeight = int (mnHeight * rScaleY); + nNewWidth = round(mnWidth * rScaleX); + nNewHeight = round(mnHeight * rScaleY); ixscale = 1 / rScaleX; iyscale = 1 / rScaleY; |