diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-05-13 14:00:10 +0000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-05-14 03:20:50 +0200 |
commit | d14d1341f2b0cd62098425b36438ae20b887fe93 (patch) | |
tree | e1bb6f188239144e7792e678c903334e099e3b9c /tools/source | |
parent | 0a3f9a7e113c184355d49dbd6bd2ed75b0980b1e (diff) |
Switch everyone to stricter GetColorError
This replaces the variant in Color with the stricter one of
BitmapColor. I couldn't find any reasoning for the lazy variant
used in Color.
Change-Id: I6dab3ab94a7f24ef5e80299d64267e3be8df888c
Reviewed-on: https://gerrit.libreoffice.org/72234
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/generic/color.cxx | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx index 4640ef85f290..061435ed61c9 100644 --- a/tools/source/generic/color.cxx +++ b/tools/source/generic/color.cxx @@ -28,15 +28,6 @@ #include <tools/helpers.hxx> #include <basegfx/color/bcolortools.hxx> -sal_uInt8 Color::GetColorError( const Color& rCompareColor ) const -{ - const long nErrAbs = labs(long(rCompareColor.R) - R) + - labs(long(rCompareColor.G) - G) + - labs(long(rCompareColor.B) - B); - - return sal_uInt8(FRound(double(nErrAbs) / 3.0)); -} - void Color::IncreaseLuminance(sal_uInt8 cLumInc) { R = sal_uInt8(std::clamp(long(R) + cLumInc, 0L, 255L)); |