diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-10-20 07:27:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-21 08:13:05 +0200 |
commit | 0fb58a1ff168ae122e9c8993a3136658e3b0e3f0 (patch) | |
tree | 908983b02f466e0a49599edc70aaa1baaa240371 /vcl/source/outdev/gradient.cxx | |
parent | b84afd2188d6993c91081885dc24664bd3f1cc73 (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/gradient.cxx')
-rw-r--r-- | vcl/source/outdev/gradient.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index 0acd89dfdb18..d67430da187d 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -264,7 +264,7 @@ void OutputDevice::DrawLinearGradient( const tools::Rectangle& rRect, // get BoundRect of rotated rectangle tools::Rectangle aRect; Point aCenter; - sal_uInt16 nAngle = rGradient.GetAngle() % 3600; + Degree10 nAngle = rGradient.GetAngle() % Degree10(3600); rGradient.GetBoundRect( rRect, aRect, aCenter ); @@ -469,7 +469,7 @@ void OutputDevice::DrawComplexGradient( const tools::Rectangle& rRect, tools::Long nRedSteps = nEndRed - nStartRed; tools::Long nGreenSteps = nEndGreen - nStartGreen; tools::Long nBlueSteps = nEndBlue - nStartBlue; - sal_uInt16 nAngle = rGradient.GetAngle() % 3600; + Degree10 nAngle = rGradient.GetAngle() % Degree10(3600); rGradient.GetBoundRect( rRect, aRect, aCenter ); @@ -622,7 +622,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect, // get BoundRect of rotated rectangle tools::Rectangle aRect; Point aCenter; - sal_uInt16 nAngle = rGradient.GetAngle() % 3600; + Degree10 nAngle = rGradient.GetAngle() % Degree10(3600); rGradient.GetBoundRect( rRect, aRect, aCenter ); @@ -819,7 +819,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const tools::Rectangle& rRect, tools::Long nRedSteps = nEndRed - nStartRed; tools::Long nGreenSteps = nEndGreen - nStartGreen; tools::Long nBlueSteps = nEndBlue - nStartBlue; - sal_uInt16 nAngle = rGradient.GetAngle() % 3600; + Degree10 nAngle = rGradient.GetAngle() % Degree10(3600); rGradient.GetBoundRect( rRect, aRect, aCenter ); |