summaryrefslogtreecommitdiff
path: root/include/tools/gen.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-12-06 22:49:09 +0100
committerMichael Stahl <mstahl@redhat.com>2016-12-07 14:46:05 +0100
commitc43fdd0d179b2c0e8e3cb890eb2694723ff87b4c (patch)
treeec56c4cf8ca024c0cb541a2bdc472598d69393b9 /include/tools/gen.hxx
parent9fb1919a65267dea1a07a76c4e8d32901dc0822a (diff)
tools: document our favorite rectangle class too
Change-Id: Id7698a1e2a8fc1ca6bf35868311fc5b284d45145
Diffstat (limited to 'include/tools/gen.hxx')
-rw-r--r--include/tools/gen.hxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 142f82cbd6b8..bebc35015e82 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -330,6 +330,15 @@ inline std::basic_ostream<charT, traits> & operator <<(
#define RECT_MAX LONG_MAX
#define RECT_MIN LONG_MIN
+/// Note: this class is a true marvel of engineering: because the author
+/// could not decide whether it's better to have a closed or half-open
+/// interval, they just implemented *both* in the same class!
+///
+/// If you have the misfortune of having to use this class, don't immediately
+/// despair but first take note that the uppercase GetWidth() / GetHeight()
+/// etc. methods interpret the interval as closed, while the lowercase
+/// getWidth() / getHeight() etc. methods interpret the interval as half-open.
+/// Ok, now is the time for despair.
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Rectangle
{
public: