- child.ApplyConstraint( constraint );
-
- constraint = Constraint::New<Quaternion>( Actor::Property::Rotation,
- LocalSource( Actor::Property::Position ),
- LocalSource( Actor::Property::Scale ),
- LocalSource( Actor::Property::Size ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
- Source(scrollView, Actor::Property::Size ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewCarouselEffect::EFFECT_ACTIVATE ) ),
- boost::bind( &ScrollCarouselEffectInfo::RotationConstraint, info, _1, _2, _3, _4, _5, _6, _7) );
+ constraint.Apply();
+
+ constraint = Constraint::New<Quaternion>( child, Actor::Property::ORIENTATION, info, &ScrollCarouselEffectInfo::RotationConstraint );
+ constraint.AddSource( LocalSource( Actor::Property::POSITION ) );
+ constraint.AddSource( LocalSource( Actor::Property::SCALE ) );
+ constraint.AddSource( LocalSource( Actor::Property::SIZE ) );
+ constraint.AddSource( Source( scrollView, Toolkit::ScrollView::Property::SCROLL_POSITION ) );
+ constraint.AddSource( Source( scrollView, Actor::Property::SIZE ) );
+ constraint.AddSource( Source( scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollViewCarouselEffect::EFFECT_ACTIVATE ) ) );