diff options
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 7bb2ae21cdf2..8038d76bf581 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1069,8 +1069,13 @@ void OpenGLSalGraphicsImpl::DrawTransformedTexture( // If downscaling at a higher scale ratio, use the area scaling algorithm rather // than plain OpenGL's scaling, for better results. // See OpenGLSalBitmap::ImplScaleArea(). - double ixscale = rTexture.GetWidth() / fabs( rX.getX() - rNull.getX()); - double iyscale = rTexture.GetHeight() / fabs( rY.getY() - rNull.getY()); + + const long nDestWidth = basegfx::fround(basegfx::B2DVector(rX - rNull).getLength()); + const long nDestHeight = basegfx::fround(basegfx::B2DVector(rY - rNull).getLength()); + + const double ixscale = rTexture.GetWidth() / nDestWidth; + const double iyscale = rTexture.GetHeight() / nDestHeight; + bool areaScaling = false; bool fastAreaScaling = false; OUString textureFragmentShader; |