IPresentationAnimationPlayer
IPresentationAnimationPlayer interface
Represents a player of the animation. Animations generated by PresentationAnimationsGenerator
via its NewAnimation
event.
public interface IPresentationAnimationPlayer
Properties
Name | Description |
---|
Duration { get; } | Get animation duration [ms] |
Methods
Examples
[C#]
using (Presentation presentation = new Presentation("animated.pptx"))
{
using (var animationsGenerator = new PresentationAnimationsGenerator(presentation.SlideSize.Size.ToSize()))
{
animationsGenerator.NewAnimation += animationPlayer =>
{
Console.WriteLine($"Animation total duration: {animationPlayer.Duration}");
animationPlayer.SetTimePosition(0);
animationPlayer.GetFrame().Save("firstFrame.png");
animationPlayer.SetTimePosition(animationPlayer.Duration);
animationPlayer.GetFrame().Save("lastFrame.png");
};
animationsGenerator.Run(presentation.Slides);
}
}
See Also