summaryrefslogtreecommitdiff
path: root/tools/source/generic
diff options
context:
space:
mode:
authorStephan Schäfer <ssa@openoffice.org>2002-03-05 08:09:47 +0000
committerStephan Schäfer <ssa@openoffice.org>2002-03-05 08:09:47 +0000
commit7f67710b006f00aa7833400f016c5c0c7f2ccf61 (patch)
tree9dc6be77be846b68e0975a25d968dc4f094d6bc2 /tools/source/generic
parentfa37745ce5acb3a75c93d4f38deea09c1fb99c67 (diff)
#97021# support HC mode
Diffstat (limited to 'tools/source/generic')
-rw-r--r--tools/source/generic/color.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index f3ca447bffb5..49a5a5ee52ee 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: color.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:03:07 $
+ * last change: $Author: ssa $ $Date: 2002-03-05 09:09:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -156,6 +156,20 @@ void Color::Invert()
// -----------------------------------------------------------------------
+BOOL Color::IsDark() const
+{
+ return GetLuminance() <= 50;
+}
+
+// -----------------------------------------------------------------------
+
+BOOL Color::IsBright() const
+{
+ return GetLuminance() >= 200;
+}
+
+// -----------------------------------------------------------------------
+
SvStream& Color::Read( SvStream& rIStm, BOOL bNewFormat )
{
if ( bNewFormat )