Remove Constraints from Cluster,ToolBar,View & ImageView
[platform/core/uifw/dali-toolkit.git] / optional / dali-toolkit / internal / controls / image-view / masked-image-view-impl.cpp
index 0ebdb0c..fad0ade 100644 (file)
@@ -355,7 +355,7 @@ void MaskedImageView::OnPropertySet( Property::Index index, Property::Value prop
   }
 }
 
-void MaskedImageView::OnPan(Actor source, PanGesture gesture)
+void MaskedImageView::OnPan(Actor source, const PanGesture& gesture)
 {
   // Used to flag whether edit mode is setting properties
   mSelfPropertySetting = true;
@@ -380,7 +380,7 @@ void MaskedImageView::OnPan(Actor source, PanGesture gesture)
   mSelfPropertySetting = false;
 }
 
-void MaskedImageView::OnPinch(Actor actor, PinchGesture pinch)
+void MaskedImageView::OnPinch(Actor actor, const PinchGesture& pinch)
 {
   // Used to flag whether edit mode is setting properties
   mSelfPropertySetting = true;
@@ -534,7 +534,6 @@ void MaskedImageView::Initialize( unsigned int targetWidth,
   // Create actor to display result of off-screen rendering
   mDestinationImageActor = ImageActor::New( mDestinationImage );
   self.Add( mDestinationImageActor );
-  mDestinationImageActor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
   mDestinationImageActor.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
 
   // Start the masking operation
@@ -633,6 +632,11 @@ MaskedImageView::~MaskedImageView()
   }
 }
 
+void MaskedImageView::OnControlSizeSet( const Vector3& targetSize )
+{
+  mDestinationImageActor.SetSize(targetSize);
+}
+
 void MaskedImageView::OnRenderTaskFinished( Dali::RenderTask& renderTask )
 {
   Toolkit::MaskedImageView handle( GetOwner() );