Run

Run(IEnumerable<ISlide>)

Run the animation events generation for each slide.

public void Run(IEnumerable<ISlide> slides)

Examples

[C#]
using (Presentation presentation = new Presentation("animated.pptx"))
{
    using (var animationsGenerator = new PresentationAnimationsGenerator(presentation.SlideSize.Size.ToSize()))
    using (var player = new PresentationPlayer(animationsGenerator, 33))
    {
        animationsGenerator.NewAnimation += animationPlayer =>
        {
            // handle new animation
        };
        
        player.FrameTick += (sender, args) =>
        {
            // handle frame tick within the new animation
        };
        
        animationsGenerator.Run(presentation.Slides);
    }
}

See Also


Run(IEnumerable<ISlide>, int, FrameTickHandler)

Run the animation events generation for each slide.

public void Run(IEnumerable<ISlide> slides, int fps, FrameTickHandler onFrame)

Examples

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

See Also