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