当前位置: 首页>>代码示例>>C++>>正文


C++ AutoPtr::AddAnimTo方法代码示例

本文整理汇总了C++中AutoPtr::AddAnimTo方法的典型用法代码示例。如果您正苦于以下问题:C++ AutoPtr::AddAnimTo方法的具体用法?C++ AutoPtr::AddAnimTo怎么用?C++ AutoPtr::AddAnimTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AutoPtr的用法示例。


在下文中一共展示了AutoPtr::AddAnimTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: WaveUpdateFrame

void WaveView::WaveUpdateFrame(
    /* [in] */ Float mouseX,
    /* [in] */ Float mouseY,
    /* [in] */ Boolean fingerDown)
{
    Double distX = mouseX - mLockCenterX;
    Double distY = mouseY - mLockCenterY;
    Int32 dragDistance = (Int32) Elastos::Core::Math::Ceil(Elastos::Core::Math::Hypot(distX, distY));
    Double touchA = Elastos::Core::Math::Atan2(distX, distY);
    Float ringX = (Float) (mLockCenterX + mRingRadius * Elastos::Core::Math::Sin(touchA));
    Float ringY = (Float) (mLockCenterY + mRingRadius * Elastos::Core::Math::Cos(touchA));
    String strX("x");
    String strY("y");
    String alpha("alpha");
    String scaleX("scaleX");
    String scaleY("scaleY");
    AutoPtr <IObjectAnimator> res;
    switch (mLockState) {
        case STATE_RESET_LOCK:
        {
            if (DBG) Logger::V(TAG, "State RESET_LOCK");
            mWaveTimerDelay = WAVE_DELAY;
            for (UInt32 i = 0; i < mLightWaves.GetSize(); i++) {
                AutoPtr<IDrawableHolder> holder = mLightWaves[i];
                holder->AddAnimTo(300, 0, alpha, 0.0f, FALSE, (IObjectAnimator**)&res);
                res = NULL;
            }
            for (UInt32 i = 0; i < mLightWaves.GetSize(); i++) {
                mLightWaves[i]->StartAnimations(
                        (IAnimatorUpdateListener*)this->Probe(EIID_IAnimatorUpdateListener));
            }

            mUnlockRing->AddAnimTo(DURATION, 0, strX, mLockCenterX, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockRing->AddAnimTo(DURATION, 0, strY, mLockCenterY, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockRing->AddAnimTo(DURATION, 0, scaleX, 0.1f, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockRing->AddAnimTo(DURATION, 0, scaleY, 0.1f, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockRing->AddAnimTo(DURATION, 0, alpha, 0.0f, TRUE, (IObjectAnimator**)&res);
            res = NULL;

            mUnlockDefault->RemoveAnimationFor(strX);
            mUnlockDefault->RemoveAnimationFor(strY);
            mUnlockDefault->RemoveAnimationFor(scaleX);
            mUnlockDefault->RemoveAnimationFor(scaleY);
            mUnlockDefault->RemoveAnimationFor(alpha);
            mUnlockDefault->SetX(mLockCenterX);
            mUnlockDefault->SetY(mLockCenterY);
            mUnlockDefault->SetScaleX(0.1f);
            mUnlockDefault->SetScaleY(0.1f);
            mUnlockDefault->SetAlpha(0.0f);
            mUnlockDefault->AddAnimTo(DURATION, SHORT_DELAY, scaleX, 1.0f, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockDefault->AddAnimTo(DURATION, SHORT_DELAY, scaleY, 1.0f, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockDefault->AddAnimTo(DURATION, SHORT_DELAY, alpha, 1.0f, TRUE, (IObjectAnimator**)&res);
            res = NULL;

            mUnlockHalo->RemoveAnimationFor(strX);
            mUnlockHalo->RemoveAnimationFor(strY);
            mUnlockHalo->RemoveAnimationFor(scaleX);
            mUnlockHalo->RemoveAnimationFor(scaleY);
            mUnlockHalo->RemoveAnimationFor(alpha);
            mUnlockHalo->SetX(mLockCenterX);
            mUnlockHalo->SetY(mLockCenterY);
            mUnlockHalo->SetScaleX(0.1f);
            mUnlockHalo->SetScaleY(0.1f);
            mUnlockHalo->SetAlpha(0.0f);
            mUnlockHalo->AddAnimTo(DURATION, SHORT_DELAY, strX, mLockCenterX, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockHalo->AddAnimTo(DURATION, SHORT_DELAY, strY, mLockCenterY, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockHalo->AddAnimTo(DURATION, SHORT_DELAY, scaleX, 1.0f, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockHalo->AddAnimTo(DURATION, SHORT_DELAY, scaleY, 1.0f, TRUE, (IObjectAnimator**)&res);
            res = NULL;
            mUnlockHalo->AddAnimTo(DURATION, SHORT_DELAY, alpha, 1.0f, TRUE, (IObjectAnimator**)&res);
            res = NULL;

            RemoveCallbacks(mLockTimerActions);

            mLockState = STATE_READY;
            break;
        }
        case STATE_READY:
        {
            if (DBG) Logger::V(TAG, "State READY");
            mWaveTimerDelay = WAVE_DELAY;
            break;
        }
        case STATE_START_ATTEMPT:
        {
            if (DBG) Logger::V(TAG, "State START_ATTEMPT");
            mUnlockDefault->RemoveAnimationFor(strX);
            mUnlockDefault->RemoveAnimationFor(strY);
            mUnlockDefault->RemoveAnimationFor(scaleX);
            mUnlockDefault->RemoveAnimationFor(scaleY);
            mUnlockDefault->RemoveAnimationFor(alpha);
//.........这里部分代码省略.........
开发者ID:imace,项目名称:ElastosRDK5_0,代码行数:101,代码来源:WaveView.cpp


注:本文中的AutoPtr::AddAnimTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。