summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/gen.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 5755929bd502..0a488a4e51b4 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -308,4 +308,11 @@ long tools::Rectangle::getWidth() const
{
return nRight == RECT_EMPTY ? 0 : nRight - nLeft;
}
+
+/// Returns the difference between bottom and top, assuming the range includes one end, but not the other.
+long tools::Rectangle::getHeight() const
+{
+ return nBottom == RECT_EMPTY ? 0 : nBottom - nTop;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */