diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-19 00:22:31 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-19 15:42:03 +0100 |
commit | bc0ab08634f59e1a1814e575fe6ad5e50bf1aee1 (patch) | |
tree | 8691eec1adefd9e4def8245898e8a3e5c5542037 /vcl/quartz | |
parent | 168ae4c00a86b7534dedd303f9ef008e19822b99 (diff) |
Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversions
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/ctfonts.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index f7c922b8aa9e..99b9066d3a0a 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -41,11 +41,6 @@ #include <sallayout.hxx> #include <hb-coretext.h> -static double toRadian(int nDegree) -{ - return nDegree * (M_PI / 1800.0); -} - CoreTextStyle::CoreTextStyle(const vcl::font::PhysicalFontFace& rPFF, const vcl::font::FontSelectPattern& rFSP) : LogicalFontInstance(rPFF, rFSP) , mfFontStretch( 1.0 ) @@ -56,7 +51,7 @@ CoreTextStyle::CoreTextStyle(const vcl::font::PhysicalFontFace& rPFF, const vcl: double fScaledFontHeight = rFSP.mfExactHeight; // convert font rotation to radian - mfFontRotation = toRadian(rFSP.mnOrientation.get()); + mfFontRotation = toRadians(rFSP.mnOrientation); // dummy matrix so we can use CGAffineTransformConcat() below CGAffineTransform aMatrix = CGAffineTransformMakeTranslation(0, 0); @@ -90,7 +85,7 @@ CoreTextStyle::CoreTextStyle(const vcl::font::PhysicalFontFace& rPFF, const vcl: (rFSP.GetItalic() == ITALIC_OBLIQUE)) && (rPFF.GetItalic() == ITALIC_NONE)) { - aMatrix = CGAffineTransformConcat(aMatrix, CGAffineTransformMake(1, 0, toRadian(120), 1, 0, 0)); + aMatrix = CGAffineTransformConcat(aMatrix, CGAffineTransformMake(1, 0, basegfx::deg2rad(12), 1, 0, 0)); } CTFontDescriptorRef pFontDesc = reinterpret_cast<CTFontDescriptorRef>(rPFF.GetFontId()); |