summaryrefslogtreecommitdiff
path: root/tools/source/generic/gen.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source/generic/gen.cxx')
-rw-r--r--tools/source/generic/gen.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 3593801579ac..53bb2680c5c8 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -233,4 +233,19 @@ OString tools::Rectangle::toString() const
return ss.str().c_str();
}
+void tools::Rectangle::expand(long nExpandBy)
+{
+ nLeft -= nExpandBy;
+ nTop -= nExpandBy;
+ if (nRight == RECT_EMPTY)
+ nRight = nLeft + nExpandBy - 1;
+ else
+ nRight += nExpandBy;
+ if (nBottom == RECT_EMPTY)
+ nBottom = nTop + nExpandBy - 1;
+ else
+ nBottom += nExpandBy;
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */