-
- Image image = ResourceImage::New( MOTION_STRETCH_ACTOR_IMAGE1 );
- mMotionStretchImageActor = ImageActor::New(image);
- mMotionStretchImageActor.SetParentOrigin( ParentOrigin::CENTER );
- mMotionStretchImageActor.SetAnchorPoint( AnchorPoint::CENTER );
- mMotionStretchImageActor.SetSize(MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT);
-
- mContentLayer.Add( mMotionStretchImageActor );
+ mMotionStretchEffect = Toolkit::CreateMotionStretchEffect();
+ mMotionStretchEffect["url"] = MOTION_STRETCH_ACTOR_IMAGE1;
+ mMotionStretchImageView = ImageView::New();
+ mMotionStretchImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionStretchEffect );
+ mMotionStretchImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mMotionStretchImageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ mMotionStretchImageView.SetProperty( Actor::Property::SIZE, Vector2( MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT ) );
+ // Add stretch padding
+ mMotionStretchImageView.SetProperty( DevelActor::Property::UPDATE_SIZE_HINT, Vector2( MOTION_STRETCH_ACTOR_WIDTH+32, MOTION_STRETCH_ACTOR_HEIGHT+32 ) );
+
+ mContentLayer.Add( mMotionStretchImageView );