summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/wallpaper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/outdev/wallpaper.cxx')
-rw-r--r--vcl/source/outdev/wallpaper.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 8a64137ed407..ae3687d79f35 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -24,6 +24,16 @@
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
+Color OutputDevice::GetReadableFontColor(const Color& rFontColor, const Color& rBgColor) const
+{
+ if (rBgColor.IsDark() && rFontColor.IsDark())
+ return COL_WHITE;
+ else if (rBgColor.IsBright() && rFontColor.IsBright())
+ return COL_BLACK;
+ else
+ return rFontColor;
+}
+
Color OutputDevice::GetBackgroundColor() const
{
return GetBackground().GetColor();