[4.0] Update animated vector images example 20/202320/1 tizen_4.0
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 27 Mar 2019 05:48:37 +0000 (14:48 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Wed, 27 Mar 2019 05:49:11 +0000 (14:49 +0900)
Change-Id: I32ee34f93f34c4d56c6cdcca99ab08b9a45ec828

examples/animated-vector-images/animated-vector-images-example.cpp

index 3caeee9..ec2a1a2 100644 (file)
@@ -57,7 +57,7 @@ class AnimatedVectorImageViewController: public ConnectionTracker
 
     Vector2 stageSize = stage.GetSize();
 
-    mImageView = ImageView::New( ANIMATED_VECTOR_IMAGE );
+    mImageView = ImageView::New();
 
     Property::Map map;
     map.Insert( Visual::Property::TYPE, Visual::IMAGE );
@@ -65,7 +65,7 @@ class AnimatedVectorImageViewController: public ConnectionTracker
     map.Insert( DevelImageVisual::Property::LOOP_COUNT, 3 );
     mImageView.SetProperty( ImageView::Property::IMAGE, map );
 
-    mImageView.SetSize( stageSize.width, stageSize.height );
+    mImageView.SetSize( stageSize.width / 2, stageSize.height / 2 );
     mImageView.SetParentOrigin( ParentOrigin::CENTER );
 
     DevelControl::VisualEventSignal( mImageView ).Connect( this, &AnimatedVectorImageViewController::OnVisualEvent );
@@ -99,7 +99,9 @@ private:
     }
     else
     {
-      DevelControl::DoAction( mImageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::PAUSE, Property::Value() );
+      DevelControl::DoAction( mImageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::STOP, Property::Value() );
+      DevelControl::DoAction( mImageView, ImageView::Property::IMAGE, DevelAnimatedVectorImageVisual::Action::JUMP_TO, 0.5f );
+
       mPauseButton.SetProperty( Button::Property::LABEL, "Play" );
     }