PresentationPlayer
PresentationPlayer class
Represents the player of animations associated with the Presentation
.
public class PresentationPlayer : IDisposable
Constructors
Properties
Name | Description |
---|
FrameIndex { get; } | Gets the frame index. |
Methods
Other Members
Examples
[C#]
using (Presentation pres = new Presentation("pres.pptx"))
{
using (var animationsGenerator = new PresentationAnimationsGenerator(pres))
{
// Play animation with 33 FPS
using (var player = new PresentationPlayer(animationsGenerator, 33))
{
player.FrameTick += (sender, args) =>
{
args.GetFrame().Save(Path.Combine("33fps", $"frame_{sender.FrameIndex}.png"));
};
animationsGenerator.Run(pres.Slides);
}
// Play animation with 45 FPS
using (var player = new PresentationPlayer(animationsGenerator, 45))
{
player.FrameTick += (sender, args) =>
{
args.GetFrame().Save(Path.Combine("45fps", $"frame_{sender.FrameIndex}.png"));
};
animationsGenerator.Run(pres.Slides);
}
}
}
See Also