src/hbcore/effects/hbeffectscale.cpp
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 5 627c4a0fd0e7
equal deleted inserted replaced
0:16d8024aca5e 1:f7ac710697a9
    34 
    34 
    35 HbEffectScaleAnimation::HbEffectScaleAnimation(
    35 HbEffectScaleAnimation::HbEffectScaleAnimation(
    36     HbEffectGroup *group,
    36     HbEffectGroup *group,
    37     HbEffectScale *effect,
    37     HbEffectScale *effect,
    38     int duration ) :
    38     int duration ) :
    39         HbEffectAnimation(),
    39         HbEffectAnimation(group),
    40         mGroup(group),
       
    41         mEffect(effect),
    40         mEffect(effect),
    42         mCenter(0),
    41         mCenter(0),
    43         mCurrentScaling(1.0)
    42         mCurrentScaling(1.0)
    44 {
    43 {
    45     setDuration(duration);
    44     setDuration(duration);
   173         mCenterYRef.clear();
   172         mCenterYRef.clear();
   174     }
   173     }
   175 
   174 
   176     if (durationX > 0) {
   175     if (durationX > 0) {
   177         mAnimationX = new HbEffectScaleAnimation(group, this, durationX);
   176         mAnimationX = new HbEffectScaleAnimation(group, this, durationX);
   178         mAnimationX->addLooping(paramX, group);
   177         mAnimationX->addLooping(paramX);
   179         mAnimationX->mCurve = curveX;
   178         mAnimationX->mCurve = curveX;
   180     }
   179     }
   181     // Create at least one animation even if both durations are zero for handling animation finish easily.
   180     // Create at least one animation even if both durations are zero for handling animation finish easily.
   182     if (durationY > 0 || !mAnimationX) {
   181     if (durationY > 0 || !mAnimationX) {
   183         mAnimationY = new HbEffectScaleAnimation(group, this, durationY);
   182         mAnimationY = new HbEffectScaleAnimation(group, this, durationY);
   184         mAnimationY->addLooping(paramY, group);
   183         mAnimationY->addLooping(paramY);
   185         mAnimationY->mCurve = curveY;
   184         mAnimationY->mCurve = curveY;
   186     }
   185     }
   187 }
   186 }
   188 
   187 
   189 
   188