diff options
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/generic/gen.cxx | 7 |
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: */ |