アニメーションの操作 -- Aspose.Slides FOSS for Python

Aspose.Slides FOSS for Python は、アニメーションの作業用のクラスを提供します。


概要

関与する主要クラスは次のとおりです:

  • IAnimationTimeLine
  • AfterAnimationType
  • AnimationTimeLine
  • ITextAnimation
  • ITextAnimationCollection

はじめに

Aspose.Slides FOSS を Python 用にインストール:

pip install aspose-slides-foss

基本的な使用方法

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)

ヒントとベストプラクティス

  • 使用後は必ずドキュメントオブジェクトを破棄してください
  • ファイルを読み書きする際にファイル I/O 例外を処理してください
  • チェックしてください API reference 最新のシグネチャを取得するために

API Reference 概要

クラス説明
IAnimationTimeLineリファレンスドキュメントをご参照ください
AfterAnimationTypeリファレンスドキュメントをご参照ください
AnimationTimeLine参照ドキュメントをご覧ください
ITextAnimation参照ドキュメントをご覧ください
ITextAnimationCollection参照ドキュメントをご覧ください

詳細については、the をご参照ください API Reference.

参照

 日本語