PresentationAnimationsGenerator

PresentationAnimationsGenerator class

Represents a generator of the animations in the Presentation.

public class PresentationAnimationsGenerator : IDisposable

Constructors

NameDescription
PresentationAnimationsGenerator(Presentation)Creates a new instance of the PresentationAnimationsGenerator.
PresentationAnimationsGenerator(Size)Creates a new instance of the PresentationAnimationsGenerator.

Properties

NameDescription
DefaultDelay { get; set; }Gets or sets default delay time [ms].
ExportedSlides { get; }Get the number of the exported slides count.
IncludeHiddenSlides { get; set; }Get or sets if hidden slides should be included.

Methods

NameDescription
Dispose()Disposes the instance of the PresentationAnimationsGenerator.
Run(IEnumerable<ISlide>)Run the animation events generation for each slide.
Run(IEnumerable<ISlide>, int, FrameTickHandler)Run the animation events generation for each slide.

Fields

NameDescription
readonly FrameSizeGets the frame size.

Events

NameDescription
event NewAnimationAn event represents that a new animation was generated.

Examples

[C#]
using (Presentation presentation = new Presentation("animated.pptx"))
{
    using (var animationsGenerator = new PresentationAnimationsGenerator(presentation))
    using (var player = new PresentationPlayer(animationsGenerator, 33))
    {
        player.FrameTick += (sender, args) =>
        {
            args.GetFrame().Save($"frame_{sender.FrameIndex}.png");
        };

        animationsGenerator.Run(presentation.Slides);
    }
}

See Also