diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-17 16:32:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-17 20:13:21 +0200 |
commit | f4351535f3bf10b94cccc721ab395e2c7f5010a4 (patch) | |
tree | 19c18c568867d47918fad11b5c2bd70459cf74cc /basegfx/source/color | |
parent | 13db6e8671c36e1a028d6a8ad63f518e60f84870 (diff) |
Consolidate: basegfx::clamp -> o3tl::clamp
Change-Id: Iffd8b0a19d4479b6c70dc834c6f64499e87e01b1
Reviewed-on: https://gerrit.libreoffice.org/59265
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basegfx/source/color')
-rw-r--r-- | basegfx/source/color/bcolormodifier.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/basegfx/source/color/bcolormodifier.cxx b/basegfx/source/color/bcolormodifier.cxx index 6704f7ea489b..f656552f69b2 100644 --- a/basegfx/source/color/bcolormodifier.cxx +++ b/basegfx/source/color/bcolormodifier.cxx @@ -18,7 +18,7 @@ */ #include <basegfx/color/bcolormodifier.hxx> - +#include <o3tl/clamp.hxx> namespace basegfx { @@ -217,11 +217,11 @@ namespace basegfx { BColorModifier_RGBLuminanceContrast::BColorModifier_RGBLuminanceContrast(double fRed, double fGreen, double fBlue, double fLuminance, double fContrast) : BColorModifier(), - mfRed(basegfx::clamp(fRed, -1.0, 1.0)), - mfGreen(basegfx::clamp(fGreen, -1.0, 1.0)), - mfBlue(basegfx::clamp(fBlue, -1.0, 1.0)), - mfLuminance(basegfx::clamp(fLuminance, -1.0, 1.0)), - mfContrast(basegfx::clamp(fContrast, -1.0, 1.0)), + mfRed(o3tl::clamp(fRed, -1.0, 1.0)), + mfGreen(o3tl::clamp(fGreen, -1.0, 1.0)), + mfBlue(o3tl::clamp(fBlue, -1.0, 1.0)), + mfLuminance(o3tl::clamp(fLuminance, -1.0, 1.0)), + mfContrast(o3tl::clamp(fContrast, -1.0, 1.0)), mfContrastOff(1.0), mfRedOff(0.0), mfGreenOff(0.0), @@ -283,9 +283,9 @@ namespace basegfx if(mbUseIt) { return basegfx::BColor( - basegfx::clamp(aSourceColor.getRed() * mfContrastOff + mfRedOff, 0.0, 1.0), - basegfx::clamp(aSourceColor.getGreen() * mfContrastOff + mfGreenOff, 0.0, 1.0), - basegfx::clamp(aSourceColor.getBlue() * mfContrastOff + mfBlueOff, 0.0, 1.0)); + o3tl::clamp(aSourceColor.getRed() * mfContrastOff + mfRedOff, 0.0, 1.0), + o3tl::clamp(aSourceColor.getGreen() * mfContrastOff + mfGreenOff, 0.0, 1.0), + o3tl::clamp(aSourceColor.getBlue() * mfContrastOff + mfBlueOff, 0.0, 1.0)); } else { |