EffectsView EffectsViewApp::CreateEffectsView( EffectsView::EffectType type, const Vector2& viewSize, int effectSize ) { Toolkit::EffectsView effectsView = Toolkit::EffectsView::New(type); // set control size effectsView.SetSize( viewSize.width, viewSize.height ); // set effect size property effectsView.SetProperty( EffectsView::Property::EFFECT_SIZE, effectSize ); // Create some content // text std::string text = ( type == EffectsView::DROP_SHADOW) ? "Drop Shadow" : "Emboss"; TextLabel textActor( TextLabel::New( text ) ); textActor.SetParentOrigin( ParentOrigin::CENTER_LEFT ); textActor.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); textActor.SetSize( viewSize ); textActor.SetPosition( viewSize.width*0.4f, viewSize.height*0.3f ); textActor.SetProperty( TextLabel::Property::POINT_SIZE, DemoHelper::ScalePointSize(14.f) ); effectsView.Add( textActor ); // image ImageView icon = ImageView::New( TEST_IMAGE ); icon.SetParentOrigin( ParentOrigin::CENTER_LEFT ); icon.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); icon.SetX( viewSize.width*0.1f ); icon.SetSize( viewSize.height*0.8f, viewSize.height*0.8f ); effectsView.Add( icon ); AnimateEffectProperties( effectsView ); return effectsView; }