- child.ApplyConstraint( constraint );
-
- constraint = Constraint::New<Quaternion>( Actor::ROTATION,
- LocalSource( Actor::POSITION ),
- LocalSource( Actor::SCALE ),
- LocalSource( Actor::SIZE ),
- Source(scrollView, scrollView.GetPropertyIndex( Toolkit::ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ),
- Source(scrollView, Actor::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 ) ) );