Werken met animatie -- Aspose.Slides FOSS for Python
Aspose.Slides FOSS voor Python biedt klassen voor het werken met animatie.
Overzicht
De belangrijkste klassen zijn:
IAnimationTimeLineAfterAnimationTypeAnimationTimeLineITextAnimationITextAnimationCollection
Aan de slag
Installeer Aspose.Slides FOSS voor Python:
pip install aspose-slides-fossBasisgebruik
import aspose.slides_foss as slides
from aspose.slides_foss import ShapeType
from aspose.slides_foss import animation as anim
from aspose.slides_foss.export import SaveFormat
with slides.Presentation() as prs:
slide = prs.slides[0]
shape = slide.shapes.add_auto_shape(ShapeType.RECTANGLE, 10, 10, 100, 50)
effect = slide.timeline.main_sequence.add_effect(
shape, anim.EffectType.FADE,
anim.EffectSubtype.NONE,
anim.EffectTriggerType.ON_CLICK,
)
prs.save("animated.pptx", SaveFormat.PPTX)Tips en best practices
- Verwijder documentobjecten altijd na gebruik
- Verwerk bestands-I/O-uitzonderingen bij het lezen of schrijven van bestanden
- Controleer de API reference voor de nieuwste handtekeningen
API Reference Samenvatting
| Klasse | Beschrijving |
|---|---|
IAnimationTimeLine | Zie referentiedocumentatie |
AfterAnimationType | Zie referentiedocumentatie |
AnimationTimeLine | Zie referentiedocumentatie |
ITextAnimation | Zie referentiedocumentatie |
ITextAnimationCollection | Zie referentiedocumentatie |
Voor volledige details, zie de API Reference.