This source file includes following definitions.
- blend
#include "config.h"
#include "platform/transforms/TranslateTransformOperation.h"
namespace WebCore {
PassRefPtr<TransformOperation> TranslateTransformOperation::blend(const TransformOperation* from, double progress, bool blendToIdentity)
{
if (from && !from->isSameType(*this))
return this;
const Length zeroLength(0, Fixed);
if (blendToIdentity)
return TranslateTransformOperation::create(zeroLength.blend(m_x, progress, ValueRangeAll), zeroLength.blend(m_y, progress, ValueRangeAll), WebCore::blend(0., m_z, progress), m_type);
const TranslateTransformOperation* fromOp = static_cast<const TranslateTransformOperation*>(from);
Length fromX = fromOp ? fromOp->m_x : zeroLength;
Length fromY = fromOp ? fromOp->m_y : zeroLength;
double fromZ = fromOp ? fromOp->m_z : 0;
return TranslateTransformOperation::create(m_x.blend(fromX, progress, ValueRangeAll), m_y.blend(fromY, progress, ValueRangeAll), WebCore::blend(fromZ, m_z, progress), m_type);
}
}