diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-26 17:13:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-28 07:34:27 +0100 |
commit | e2cb154195fdc2ffccdb6f5e87cae8b29640b3eb (patch) | |
tree | 7c3d53d78e0867aa879b98d84211d1e73602520f /cppcanvas/source/mtfrenderer/implrenderer.cxx | |
parent | 0ea41fea75cd1ac1d81fa57c4411e75a6b4001f0 (diff) |
convert COL_ constants to be of type Color
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48
Reviewed-on: https://gerrit.libreoffice.org/50373
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppcanvas/source/mtfrenderer/implrenderer.cxx')
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index fa08f0325714..5d45c82b0f59 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -887,7 +887,7 @@ namespace cppcanvas // determine shadow color (from outdev3.cxx) ::Color aTextColor = vcl::unotools::doubleSequenceToColor( rState.textColor, xColorSpace ); - bool bIsDark = (aTextColor.GetColor() == COL_BLACK) + bool bIsDark = (aTextColor == COL_BLACK) || (aTextColor.GetLuminance() < 8); aShadowColor = bIsDark ? COL_LIGHTGRAY : COL_BLACK; @@ -917,7 +917,7 @@ namespace cppcanvas // we don't have a automatic color, so black is always // drawn on white (literally copied from // vcl/source/gdi/outdev3.cxx) - if( aTextColor.GetColor() == COL_BLACK ) + if( aTextColor == COL_BLACK ) { aTextColor = ::COL_WHITE; rParms.mrStates.getState().textColor = @@ -925,7 +925,7 @@ namespace cppcanvas aTextColor, xColorSpace ); } - if( aTextColor.GetColor() == COL_WHITE ) + if( aTextColor == COL_WHITE ) aReliefColor = ::COL_BLACK; aReliefColor.SetTransparency( aTextColor.GetTransparency() ); } |