Remove mesh from text input.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / shader-effects / motion-stretch-effect.cpp
index eecf1d0..bc69f72 100644 (file)
@@ -22,6 +22,7 @@
 #include <dali/public-api/animation/active-constraint.h>
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
+#include <dali/public-api/actors/image-actor.h>
 
 namespace Dali
 {
@@ -98,12 +99,17 @@ MotionStretchEffect::~MotionStretchEffect()
 MotionStretchEffect MotionStretchEffect::Apply( RenderableActor renderable )
 {
   MotionStretchEffect newEffect = New();
-  renderable.SetShaderEffect( newEffect );
 
-  Property::Index uModelProperty = newEffect.GetPropertyIndex( MOTION_STRETCH_MODELVIEW_LASTFRAME );
+  ImageActor imageActor = ImageActor::DownCast(renderable);
+  if( imageActor )
+  {
+    imageActor.SetShaderEffect( newEffect );
+  }
+
+  Dali::Property::Index uModelProperty = newEffect.GetPropertyIndex( MOTION_STRETCH_MODELVIEW_LASTFRAME );
 
   Constraint constraint = Constraint::New<Matrix>( uModelProperty,
-                                                   Source( renderable, Actor::WORLD_MATRIX ),
+                                                   Source( renderable, Actor::Property::WorldMatrix ),
                                                    EqualToConstraint() );
 
   // and set up constraint.