diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-03-07 00:05:28 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-03-07 00:15:54 +0100 |
commit | 729572957402e43d055482b51080034109b16ec6 (patch) | |
tree | 6f598a957460aa8ea425c9b5de3fedaea6b74cb8 /vcl/opengl | |
parent | f12e8d66189651540ba60664328828ab2e8756c6 (diff) |
opengl: fix inv.scale values are always integer - cid#1352479
Force cast to double to avoid integer division - which gives a
wrong inverse scale value.
Change-Id: I0135e44ef07f3915619f9dfead9aadf50fc03685
Diffstat (limited to 'vcl/opengl')
-rw-r--r-- | vcl/opengl/gdiimpl.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 2efac9741908..24e16317cf57 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1384,8 +1384,8 @@ void OpenGLSalGraphicsImpl::DrawTransformedTexture( if( nDestHeight == 0 || nDestWidth == 0 ) return; - const double ixscale = rTexture.GetWidth() / nDestWidth; - const double iyscale = rTexture.GetHeight() / nDestHeight; + const double ixscale = rTexture.GetWidth() / double(nDestWidth); + const double iyscale = rTexture.GetHeight() / double(nDestHeight); bool areaScaling = false; bool fastAreaScaling = false; |