diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-14 12:50:42 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-15 06:34:33 +0200 |
commit | 690526f95e3ee4fd25bb2c987e093543e4bc435b (patch) | |
tree | 06b6bb7b6c907fb1876eac1e60b7dac952b21f7b /vcl/source/graphic | |
parent | 1dc92b9e9951ef118d2d823d54f9a022c2e41a27 (diff) |
Generalize basegfx::fround for templated return type
And use it when assigning to tools::Long
Change-Id: I0814d7bac9cdd48191ba69c64e3b12a4973b3417
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166071
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl/source/graphic')
-rw-r--r-- | vcl/source/graphic/GraphicObject.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/graphic/GraphicObject.cxx b/vcl/source/graphic/GraphicObject.cxx index 7abf3b3d3bfd..3ba9ef64ce94 100644 --- a/vcl/source/graphic/GraphicObject.cxx +++ b/vcl/source/graphic/GraphicObject.cxx @@ -743,10 +743,10 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo const double fFactorX(static_cast<double>(aBitmapEx.GetSizePixel().Width()) / aSrcSizePixel.Width()); const double fFactorY(static_cast<double>(aBitmapEx.GetSizePixel().Height()) / aSrcSizePixel.Height()); - aCropLeftTop.setWidth( basegfx::fround(aCropLeftTop.Width() * fFactorX) ); - aCropLeftTop.setHeight( basegfx::fround(aCropLeftTop.Height() * fFactorY) ); - aCropRightBottom.setWidth( basegfx::fround(aCropRightBottom.Width() * fFactorX) ); - aCropRightBottom.setHeight( basegfx::fround(aCropRightBottom.Height() * fFactorY) ); + aCropLeftTop.setWidth( basegfx::fround<tools::Long>(aCropLeftTop.Width() * fFactorX) ); + aCropLeftTop.setHeight( basegfx::fround<tools::Long>(aCropLeftTop.Height() * fFactorY) ); + aCropRightBottom.setWidth( basegfx::fround<tools::Long>(aCropRightBottom.Width() * fFactorX) ); + aCropRightBottom.setHeight( basegfx::fround<tools::Long>(aCropRightBottom.Height() * fFactorY) ); aSrcSizePixel = aBitmapEx.GetSizePixel(); } |