Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / shadow-view / shadow-view-impl.cpp
index 9bc67c7..a1ad3b6 100644 (file)
@@ -168,6 +168,7 @@ void ShadowView::SetShadowPlane(Actor shadowPlane)
   mShadowPlaneBg = shadowPlane;
 
   mShadowPlane = ImageActor::New();
+  mShadowPlane.SetName( "SHADOW_PLANE" );
   mShadowPlane.SetParentOrigin(ParentOrigin::CENTER);
   mShadowPlane.SetAnchorPoint(AnchorPoint::CENTER);
 
@@ -182,9 +183,9 @@ void ShadowView::SetShadowPlane(Actor shadowPlane)
 
   ConstrainCamera();
 
-  mShadowPlane.SetSizeMode( SIZE_EQUAL_TO_PARENT );
+  mShadowPlane.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
 
-  mBlurRootActor.SetSizeMode( SIZE_EQUAL_TO_PARENT );
+  mBlurRootActor.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
 }
 
 void ShadowView::SetPointLight(Actor pointLight)
@@ -239,7 +240,8 @@ void ShadowView::OnInitialize()
 {
   // root actor to parent all user added actors. Used as source actor for shadow render task.
   mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
-  mChildrenRoot.SetSizeMode( SIZE_EQUAL_TO_PARENT );
+  mChildrenRoot.SetRelayoutEnabled( true );
+  mChildrenRoot.SetResizePolicy( FILL_TO_PARENT, ALL_DIMENSIONS );
 
   Vector2 stageSize = Stage::GetCurrent().GetSize();
   mCameraActor = CameraActor::New(stageSize);
@@ -249,7 +251,7 @@ void ShadowView::OnInitialize()
   // Target is constrained to point at the shadow plane origin
   mCameraActor.SetNearClippingPlane( 1.0f );
   mCameraActor.SetType( Dali::Camera::FREE_LOOK ); // Camera orientation constrained to point at shadow plane world position
-  mCameraActor.SetRotation(Radian(Degree(180)), Vector3::YAXIS);
+  mCameraActor.SetOrientation(Radian(Degree(180)), Vector3::YAXIS);
   mCameraActor.SetPosition(DEFAULT_LIGHT_POSITION);
 
   mShadowRenderShader = ShaderEffect::New( RENDER_SHADOW_VERTEX_SOURCE, RENDER_SHADOW_FRAGMENT_SOURCE,
@@ -274,10 +276,12 @@ void ShadowView::OnInitialize()
   mBlurFilter.SetPixelFormat(Pixel::RGBA8888);
 
   mBlurRootActor = Actor::New();
+  mBlurRootActor.SetName( "BLUR_ROOT_ACTOR" );
+  mBlurRootActor.SetRelayoutEnabled( true );
 
   // Turn off inheritance to ensure filter renders properly
   mBlurRootActor.SetPositionInheritanceMode(USE_PARENT_POSITION);
-  mBlurRootActor.SetInheritRotation(false);
+  mBlurRootActor.SetInheritOrientation(false);
   mBlurRootActor.SetInheritScale(false);
   mBlurRootActor.SetColorMode(USE_OWN_COLOR);
 
@@ -315,10 +319,10 @@ void ShadowView::ConstrainCamera()
     // is under control of application, can't use transform inheritance)
 
     Constraint cameraOrientationConstraint =
-      Constraint::New<Quaternion> ( Actor::Property::ROTATION,
+      Constraint::New<Quaternion> ( Actor::Property::ORIENTATION,
                                     Source( mShadowPlane, Actor::Property::WORLD_POSITION ),
                                     Source( mPointLight,  Actor::Property::WORLD_POSITION ),
-                                    Source( mShadowPlane, Actor::Property::WORLD_ROTATION ),
+                                    Source( mShadowPlane, Actor::Property::WORLD_ORIENTATION ),
                                     &LookAt );
 
     mCameraActor.ApplyConstraint( cameraOrientationConstraint );