(Vector) Ensure the current frame is not out of the play range 77/220477/3
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 18 Dec 2019 10:55:57 +0000 (19:55 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 23 Dec 2019 00:54:39 +0000 (00:54 +0000)
Change-Id: I7077b0de7133f4282b66d2c4de2a1ce6b8555256

dali-toolkit/internal/visuals/animated-vector-image/vector-animation-task.cpp

index 213051f..f8598ab 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/integration-api/debug.h>
 #include <dali/public-api/object/property-array.h>
+#include <dali/public-api/math/math-utils.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/visuals/image-visual-shader-factory.h>
@@ -428,6 +429,7 @@ bool VectorAnimationTask::Rasterize()
     if( mPlayState == PlayState::PLAYING && mUpdateFrameNumber )
     {
       mCurrentFrame = mForward ? mCurrentFrame + 1 : mCurrentFrame - 1;
+      Dali::ClampInPlace( mCurrentFrame, mStartFrame, mEndFrame );
     }
 
     currentFrame = mCurrentFrame;