From c43fdd0d179b2c0e8e3cb890eb2694723ff87b4c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 6 Dec 2016 22:49:09 +0100 Subject: tools: document our favorite rectangle class too Change-Id: Id7698a1e2a8fc1ca6bf35868311fc5b284d45145 --- include/tools/gen.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/tools/gen.hxx') 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 & 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: -- cgit