summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-04-16 23:10:45 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-04-17 03:56:59 +0200
commitea9904c89608d561f6bde3379408208bbb24fe35 (patch)
tree4648cbc73b7a48ea3361f51280a9713be38f0afd /include/svx
parent0957ee9f5d379c80fca4027c187b471118d0490d (diff)
Drop FRound, and use generalized basegfx::fround
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/svx')
-rw-r--r--include/svx/svdtrans.hxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx
index ae225426afd6..2b32386e1004 100644
--- a/include/svx/svdtrans.hxx
+++ b/include/svx/svdtrans.hxx
@@ -94,27 +94,27 @@ inline void ResizePoint(Point& rPnt, const Point& rRef, const Fraction& xFract,
{
double nxFract = xFract.IsValid() ? static_cast<double>(xFract) : 1.0;
double nyFract = yFract.IsValid() ? static_cast<double>(yFract) : 1.0;
- rPnt.setX(rRef.X() + FRound( (rPnt.X() - rRef.X()) * nxFract ));
- rPnt.setY(rRef.Y() + FRound( (rPnt.Y() - rRef.Y()) * nyFract ));
+ rPnt.setX(rRef.X() + basegfx::fround<tools::Long>((rPnt.X() - rRef.X()) * nxFract));
+ rPnt.setY(rRef.Y() + basegfx::fround<tools::Long>((rPnt.Y() - rRef.Y()) * nyFract));
}
inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs)
{
tools::Long dx=rPnt.X()-rRef.X();
tools::Long dy=rPnt.Y()-rRef.Y();
- rPnt.setX(FRound(rRef.X()+dx*cs+dy*sn));
- rPnt.setY(FRound(rRef.Y()+dy*cs-dx*sn));
+ rPnt.setX(basegfx::fround<tools::Long>(rRef.X() + dx * cs + dy * sn));
+ rPnt.setY(basegfx::fround<tools::Long>(rRef.Y() + dy * cs - dx * sn));
}
inline void ShearPoint(Point& rPnt, const Point& rRef, double tn, bool bVShear)
{
if (!bVShear) { // Horizontal
if (rPnt.Y()!=rRef.Y()) { // else not needed
- rPnt.AdjustX(-FRound((rPnt.Y()-rRef.Y())*tn));
+ rPnt.AdjustX(basegfx::fround<tools::Long>((rRef.Y() - rPnt.Y()) * tn));
}
} else { // or else vertical
if (rPnt.X()!=rRef.X()) { // else not needed
- rPnt.AdjustY(-FRound((rPnt.X()-rRef.X())*tn));
+ rPnt.AdjustY(basegfx::fround<tools::Long>((rRef.X() - rPnt.X()) * tn));
}
}
}