diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-03-07 00:05:28 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-24 10:23:28 +0000 |
commit | cedf39fcd2e18428b1e580f5e0e9e06c7eed2dee (patch) | |
tree | 42e5cb84740ab7cb741e3014575d6210c4750da4 /vcl | |
parent | cd8855b8ddf7a1c4ea13851eb9e97e95dbcdbe3b (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
Reviewed-on: https://gerrit.libreoffice.org/23462
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-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 59545f8e3892..3384ebe13900 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -1386,8 +1386,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; |