ShadowData ShadowData::blend(const ShadowData& from, double progress, const Color& currentColor) const
{
    ASSERT(style() == from.style());
    return ShadowData(blink::blend(from.location(), location(), progress),
        clampTo(blink::blend(from.blur(), blur(), progress), 0.0f),
        blink::blend(from.spread(), spread(), progress),
        style(),
        blink::blend(from.color().resolve(currentColor), color().resolve(currentColor), progress));
}
Exemple #2
0
ShadowData ShadowData::blend(const ShadowData& from, double progress) const
{
    if (style() != from.style())
        return *this;

    return ShadowData(WebCore::blend(from.location(), location(), progress),
        clampTo<int>(WebCore::blend(from.blur(), blur(), progress), 0),
        WebCore::blend(from.spread(), spread(), progress),
        style(),
        WebCore::blend(from.color(), color(), progress));
}