aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-04-22 09:22:05 +1000
committerNeil <nyamatongwe@gmail.com>2015-04-22 09:22:05 +1000
commite7b1483bf0eb8c1517322f1b49e5293d7f43c9d1 (patch)
tree7579d2e0ec3ef933101816a16021bfdb2d349c80 /qt/ScintillaEditBase/PlatQt.h
parent9eb90ce37cb4beb01684e41ffb1eea740f3032ec (diff)
downloadscintilla-mirror-e7b1483bf0eb8c1517322f1b49e5293d7f43c9d1.tar.gz
Use fractional positioning calls and avoid rounding to ensure consistency.
From Jason Haslam.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.h')
-rw-r--r--qt/ScintillaEditBase/PlatQt.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.h b/qt/ScintillaEditBase/PlatQt.h
index 60a7e7300..be35d818b 100644
--- a/qt/ScintillaEditBase/PlatQt.h
+++ b/qt/ScintillaEditBase/PlatQt.h
@@ -34,6 +34,11 @@ inline QRect QRectFromPRect(PRectangle pr)
return QRect(pr.left, pr.top, pr.Width(), pr.Height());
}
+inline QRectF QRectFFromPRect(PRectangle pr)
+{
+ return QRectF(pr.left, pr.top, pr.Width(), pr.Height());
+}
+
inline PRectangle PRectFromQRect(QRect qr)
{
return PRectangle(qr.x(), qr.y(), qr.x() + qr.width(), qr.y() + qr.height());