예제 #1
0
Color ColorDistance::addColorsAndClamp(const Color& first, const Color& second)
{
    return Color(clampColorValue(first.red() + second.red()),
                 clampColorValue(first.green() + second.green()),
                 clampColorValue(first.blue() + second.blue()));
}
예제 #2
0
Color ColorDistance::addToColorAndClamp(const Color& color) const
{
    return Color(clampColorValue(color.red() + m_redDiff),
                 clampColorValue(color.green() + m_greenDiff),
                 clampColorValue(color.blue() + m_blueDiff));
}
예제 #3
0
Color ColorDistance::clampColor(int red, int green, int blue, int alpha)
{
    return Color(clampColorValue(red), clampColorValue(green), clampColorValue(blue), clampColorValue(alpha));
}