summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/textline.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-20 07:27:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-21 08:13:05 +0200
commit0fb58a1ff168ae122e9c8993a3136658e3b0e3f0 (patch)
tree908983b02f466e0a49599edc70aaa1baaa240371 /vcl/source/outdev/textline.cxx
parentb84afd2188d6993c91081885dc24664bd3f1cc73 (diff)
new tools::Degree10 strong typedef
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/outdev/textline.cxx')
-rw-r--r--vcl/source/outdev/textline.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index eb716ebdb49f..09ee52f6339a 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -49,7 +49,7 @@ void OutputDevice::ImplInitAboveTextLineSize()
void OutputDevice::ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY,
tools::Long nCurX, tools::Long nCurY,
- short nOrientation,
+ Degree10 nOrientation,
SalGraphics* pGraphics,
OutputDevice const * pOutDev,
bool bDrawPixAsRect,
@@ -75,7 +75,7 @@ void OutputDevice::ImplDrawWavePixel( tools::Long nOriginX, tools::Long nOriginY
void OutputDevice::ImplDrawWaveLine( tools::Long nBaseX, tools::Long nBaseY,
tools::Long nDistX, tools::Long nDistY,
tools::Long nWidth, tools::Long nHeight,
- tools::Long nLineWidth, short nOrientation,
+ tools::Long nLineWidth, Degree10 nOrientation,
const Color& rColor )
{
if ( !nHeight )
@@ -678,7 +678,7 @@ void OutputDevice::ImplDrawTextLine( tools::Long nX, tools::Long nY,
{
tools::Long nXAdd = nWidth - nDistX;
if( mpFontInstance->mnOrientation )
- nXAdd = FRound( nXAdd * cos( mpFontInstance->mnOrientation * F_PI1800 ) );
+ nXAdd = FRound( nXAdd * cos( mpFontInstance->mnOrientation.get() * F_PI1800 ) );
nX += nXAdd - 1;
}
@@ -750,7 +750,7 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStri
if( mpFontInstance->mnOrientation )
{
const tools::Long nDY = aPos.Y() - aStartPt.Y();
- const double fRad = mpFontInstance->mnOrientation * F_PI1800;
+ const double fRad = mpFontInstance->mnOrientation.get() * F_PI1800;
nDist = FRound( nDist*cos(fRad) - nDY*sin(fRad) );
}
}
@@ -972,7 +972,7 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, to
fOrientation = std::atan2(nStartY - nEndY, (nLengthX == 0 ? 0.000000001 : nLengthX));
fOrientation /= F_PI180;
// un-rotate the end point
- aStartPt.RotateAround(nEndX, nEndY, -fOrientation * 10.0);
+ aStartPt.RotateAround(nEndX, nEndY, Degree10(static_cast<sal_Int16>(-fOrientation * 10.0)));
}
tools::Long nWaveHeight = 3;