diff options
Diffstat (limited to 'vcl/opengl/scale.cxx')
-rw-r--r-- | vcl/opengl/scale.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx index 433ad19f2e8b..a5280bf70817 100644 --- a/vcl/opengl/scale.cxx +++ b/vcl/opengl/scale.cxx @@ -19,6 +19,8 @@ #include <sal/config.h> +#include <cmath> + #include <vcl/opengl/OpenGLHelper.hxx> #include <vcl/bitmap.hxx> @@ -203,7 +205,7 @@ bool OpenGLSalBitmap::ImplScaleArea( const rtl::Reference< OpenGLContext > &xCon double ixscale = 1 / rScaleX; double iyscale = 1 / rScaleY; - bool fast = ( ixscale == int( ixscale ) && iyscale == int( iyscale ) + bool fast = ( ixscale == std::trunc( ixscale ) && iyscale == std::trunc( iyscale ) && int( nNewWidth * ixscale ) == mnWidth && int( nNewHeight * iyscale ) == mnHeight ); bool bTwoPasses = false; |