AddEffect()

Sequence::AddEffect(System::SharedPtr<IShape>, EffectType, EffectSubtype, EffectTriggerType) method

Add new effect to the end of sequence.

System::SharedPtr<IEffect> Aspose::Slides::Animation::Sequence::AddEffect(System::SharedPtr<IShape> shape, EffectType effectType, EffectSubtype subtype, EffectTriggerType triggerType) override

Arguments

ParameterTypeDescription
shapeSystem::SharedPtr<IShape>Shape object IShape for adding an effect
effectTypeEffectTypeType of an animation effect EffectType
subtypeEffectSubtypeSubtypes of animation effect EffectSubtype
triggerTypeEffectTriggerTypeTrigger type of effect EffectTriggerType

Return Value

New effect object IEffect

Sequence::AddEffect(System::SharedPtr<IParagraph>, EffectType, EffectSubtype, EffectTriggerType) method

Add new animation effect for paragraph to the end of sequence.

System::SharedPtr<IEffect> Aspose::Slides::Animation::Sequence::AddEffect(System::SharedPtr<IParagraph> paragraph, EffectType effectType, EffectSubtype subtype, EffectTriggerType triggerType) override

Arguments

ParameterTypeDescription
paragraphSystem::SharedPtr<IParagraph>Paragraph object IParagraph
effectTypeEffectTypeType of an animation effect EffectType
subtypeEffectSubtypeSubtypes of animation effect EffectSubtype
triggerTypeEffectTriggerTypeTrigger type of effect EffectTriggerType

Return Value

New effect object IEffect

Remarks

auto presentation = System::MakeObject<Presentation>(path + u"input.pptx");
// select paragraph to add effect
auto autoShape = System::ExplicitCast<Aspose::Slides::IAutoShape>(presentation->get_Slides()->idx_get(0)->get_Shapes()->idx_get(0));
auto paragraph = autoShape->get_TextFrame()->get_Paragraphs()->idx_get(0);
// add Fly animation effect to selected paragraph
auto effect = presentation->get_Slides()->idx_get(0)->get_Timeline()->get_MainSequence()->AddEffect(
     paragraph, 
     Aspose::Slides::Animation::EffectType::Fly, 
     Aspose::Slides::Animation::EffectSubtype::Left, 
     Aspose::Slides::Animation::EffectTriggerType::OnClick);

Sequence::AddEffect(System::SharedPtr<Aspose::Slides::Charts::IChart>, EffectChartMajorGroupingType, int32_t, EffectType, EffectSubtype, EffectTriggerType) method

Adds the new chart animation effect for category or series to the end of sequence.

System::SharedPtr<IEffect> Aspose::Slides::Animation::Sequence::AddEffect(System::SharedPtr<Aspose::Slides::Charts::IChart> chart, EffectChartMajorGroupingType type, int32_t index, EffectType effectType, EffectSubtype subtype, EffectTriggerType triggerType) override

Arguments

ParameterTypeDescription
chartSystem::SharedPtr<Aspose::Slides::Charts::IChart>Chart object Aspose::Slides::Charts::IChart
typeEffectChartMajorGroupingTypeType of an animation effect EffectChartMinorGroupingType
indexint32_tIndex int32_t
effectTypeEffectTypeType of an animation effect EffectType
subtypeEffectSubtypeSubtypes of animation effect EffectSubtype
triggerTypeEffectTriggerTypeTrigger type of effect EffectTriggerType

Return Value

New effect object IEffect

Sequence::AddEffect(System::SharedPtr<Aspose::Slides::Charts::IChart>, EffectChartMinorGroupingType, int32_t, int32_t, EffectType, EffectSubtype, EffectTriggerType) method

Adds the new chart animation effect for elements in category or series to the end of sequence.

System::SharedPtr<IEffect> Aspose::Slides::Animation::Sequence::AddEffect(System::SharedPtr<Aspose::Slides::Charts::IChart> chart, EffectChartMinorGroupingType type, int32_t seriesIndex, int32_t categoriesIndex, EffectType effectType, EffectSubtype subtype, EffectTriggerType triggerType) override

Arguments

ParameterTypeDescription
chartSystem::SharedPtr<Aspose::Slides::Charts::IChart>Chart object Aspose::Slides::Charts::IChart
typeEffectChartMinorGroupingTypeType of an animation effect EffectChartMinorGroupingType
seriesIndexint32_tIndex of chart series int32_t
categoriesIndexint32_tIndex of category int32_t
effectTypeEffectTypeType of an animation effect EffectType
subtypeEffectSubtypeSubtypes of animation effect EffectSubtype
triggerTypeEffectTriggerTypeTrigger type of effect EffectTriggerType

Return Value

New effect object IEffect

See Also