X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fshadow-view%2Fshadow-view-impl.cpp;h=217101b795a082a8f1bdd7ece1da454640ffb0dd;hp=283016548c00ed9789a12792ed83d8f698d19724;hb=b1e8521ad77e7b4e62b59613b2edef64429130e9;hpb=5e937a6322849b76d49d5b3f41cb5d91c94acd3e diff --git a/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp b/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp index 2830165..217101b 100644 --- a/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp +++ b/dali-toolkit/internal/controls/shadow-view/shadow-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -169,7 +169,7 @@ void ShadowView::SetShadowPlaneBackground(Actor shadowPlaneBackground) // position, instead parent the shadow plane drawable on the shadow plane passed in. mShadowPlaneBg.Add( mShadowPlane ); mShadowPlane.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); - mShadowPlane.SetZ( 1.0f ); + mShadowPlane.SetProperty( Actor::Property::POSITION_Z, 1.0f ); ConstrainCamera(); @@ -209,7 +209,7 @@ void ShadowView::SetShadowColor(Vector4 color) void ShadowView::Activate() { - DALI_ASSERT_ALWAYS( Self().OnStage() && "ShadowView should be on stage before calling Activate()\n" ); + DALI_ASSERT_ALWAYS( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && "ShadowView should be on stage before calling Activate()\n" ); // make sure resources are allocated and start the render tasks processing CreateRenderTasks(); @@ -217,7 +217,7 @@ void ShadowView::Activate() void ShadowView::Deactivate() { - DALI_ASSERT_ALWAYS( Self().OnStage() && "ShadowView should be on stage before calling Deactivate()\n" ) + DALI_ASSERT_ALWAYS( Self().GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE ) && "ShadowView should be on stage before calling Deactivate()\n" ) // stop render tasks processing // Note: render target resources are automatically freed since we set the Image::Unused flag @@ -243,8 +243,8 @@ 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.SetOrientation(Radian(Degree(180)), Vector3::YAXIS); - mCameraActor.SetPosition(DEFAULT_LIGHT_POSITION); + mCameraActor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Radian(Degree(180)), Vector3::YAXIS) ); + mCameraActor.SetProperty( Actor::Property::POSITION, DEFAULT_LIGHT_POSITION ); // Create render targets needed for rendering from light's point of view mSceneFromLightRenderTarget = FrameBuffer::New( stageSize.width, stageSize.height, FrameBuffer::Attachment::NONE ); @@ -275,7 +275,7 @@ void ShadowView::OnInitialize() mBlurRootActor.SetProperty( Actor::Property::INHERIT_POSITION, false ); mBlurRootActor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false ); mBlurRootActor.SetProperty( Actor::Property::INHERIT_SCALE, false ); - mBlurRootActor.SetColorMode( USE_OWN_COLOR ); + mBlurRootActor.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_COLOR ); Self().Add( mBlurRootActor );