From 7ff2c9cfc5fa8c261b1f7f959172f60255fcf617 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Fri, 19 Nov 2021 20:04:22 +0300 Subject: Use more basegfx::deg2rad and basegfx::rad2deg Change-Id: I9dc57628b98f67994d546f6887e96389be1efe62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125568 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- vcl/source/bitmap/BitmapEmbossGreyFilter.cxx | 4 ++-- vcl/source/outdev/bitmapex.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'vcl') diff --git a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx index d25950b1c9f2..a8705176f1d1 100644 --- a/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx +++ b/vcl/source/bitmap/BitmapEmbossGreyFilter.cxx @@ -46,8 +46,8 @@ BitmapEx BitmapEmbossGreyFilter::execute(BitmapEx const& rBitmapEx) const sal_Int32 nGrey11, nGrey12, nGrey13; sal_Int32 nGrey21, nGrey22, nGrey23; sal_Int32 nGrey31, nGrey32, nGrey33; - double fAzim = basegfx::deg2rad(mnAzimuthAngle100 * 0.01); - double fElev = basegfx::deg2rad(mnElevationAngle100 * 0.01); + double fAzim = basegfx::deg2rad<100>(mnAzimuthAngle100); + double fElev = basegfx::deg2rad<100>(mnElevationAngle100); std::unique_ptr pHMap(new sal_Int32[nWidth + 2]); std::unique_ptr pVMap(new sal_Int32[nHeight + 2]); sal_Int32 nX, nY, nNx, nNy, nDotL; diff --git a/vcl/source/outdev/bitmapex.cxx b/vcl/source/outdev/bitmapex.cxx index 44170e633bfe..7855d1ae5613 100644 --- a/vcl/source/outdev/bitmapex.cxx +++ b/vcl/source/outdev/bitmapex.cxx @@ -665,7 +665,7 @@ void OutputDevice::DrawTransformedBitmapEx( { fFullRotate += 2 * M_PI; } - Degree10 nAngle10(basegfx::fround(basegfx::rad2deg(fFullRotate) * 10)); + Degree10 nAngle10(basegfx::fround(basegfx::rad2deg<10>(fFullRotate))); aTransformed.Rotate(nAngle10, COL_TRANSPARENT); } basegfx::B2DRange aTargetRange(0.0, 0.0, 1.0, 1.0); -- cgit