X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Feffects-view%2Feffects-view-impl.cpp;h=0999db55c69970c1751c56ee4d84478333e8dc9c;hb=957e21ff67b0680b79b8532db4ea310c43eef770;hp=8304e0efeeb9dad4e29906896df7e85a8c52b9ff;hpb=b458e407eba11c73f38da68bce8e967a30ea03e2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp b/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp index 8304e0e..0999db5 100644 --- a/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp +++ b/dali-toolkit/internal/controls/effects-view/effects-view-impl.cpp @@ -19,12 +19,11 @@ #include "effects-view-impl.h" // EXTERNAL INCLUDES -#include #include #include #include #include -#include +#include #include // INTERNAL INCLUDES @@ -113,7 +112,7 @@ Toolkit::EffectsView EffectsView::New() } EffectsView::EffectsView() -: Control( CONTROL_BEHAVIOUR_NONE ), +: Control( ControlBehaviour( ACTOR_BEHAVIOUR_NONE ) ), mEffectType( Toolkit::EffectsView::INVALID_TYPE ), mPixelFormat( EFFECTS_VIEW_DEFAULT_PIXEL_FORMAT ), mSpread(0.0f), @@ -271,8 +270,14 @@ void EffectsView::SetupProperties() mEffectStrengthPropertyIndex = self.RegisterProperty(EFFECT_STRENGTH_PROPERTY_NAME, EFFECT_STRENGTH_DEFAULT, Property::READ_WRITE); mEffectOffsetPropertyIndex = self.RegisterProperty(EFFECT_OFFSET_PROPERTY_NAME, EFFECT_OFFSET_DEFAULT); mEffectColorPropertyIndex = self.RegisterProperty(EFFECT_COLOR_PROPERTY_NAME, EFFECT_COLOR_DEFAULT); - mActorPostFilter.ApplyConstraint( Constraint::New( Actor::Property::POSITION, Source( self, mEffectOffsetPropertyIndex ), EqualToConstraint() ) ); - mActorPostFilter.ApplyConstraint( Constraint::New( Actor::Property::COLOR, Source( self, mEffectColorPropertyIndex ), EqualToConstraint() ) ); + + Constraint positionConstraint = Constraint::New( mActorPostFilter, Actor::Property::POSITION, EqualToConstraint() ); + positionConstraint.AddSource( Source( self, mEffectOffsetPropertyIndex ) ); + positionConstraint.Apply(); + + Constraint colorConstraint = Constraint::New( mActorPostFilter, Actor::Property::COLOR, EqualToConstraint() ); + colorConstraint.AddSource( Source( self, mEffectColorPropertyIndex ) ); + colorConstraint.Apply(); } void EffectsView::SetBackgroundColor( const Vector4& color ) @@ -310,7 +315,7 @@ void EffectsView::OnInitialize() SetupProperties(); } -void EffectsView::OnControlSizeSet(const Vector3& targetSize) +void EffectsView::OnSizeSet(const Vector3& targetSize) { mTargetSize = Vector2(targetSize); @@ -465,7 +470,6 @@ void EffectsView::SetupCameras() mCameraForChildren.SetAspectRatio(mTargetSize.width / mTargetSize.height); mCameraForChildren.SetType(Dali::Camera::FREE_LOOK); // camera orientation based solely on actor mCameraForChildren.SetPosition(0.0f, 0.0f, mTargetSize.height * cameraPosScale); - mCameraForChildren.SetRotation(Quaternion(M_PI, Vector3::YAXIS)); mCameraForChildren.SetZ( mTargetSize.height * cameraPosScale ); }