PresentationPlayer

Clase PresentationPlayer

Representa el reproductor de animaciones asociadas con el Presentation.

public class PresentationPlayer : IDisposable  

Constructores

NombreDescripción
PresentationPlayer(PresentationAnimationsGenerator, double)Crea una nueva instancia del PresentationPlayer.

Propiedades

NombreDescripción
FrameIndex { get; }Obtiene el índice del marco.

Métodos

NombreDescripción
Dispose()Libera la instancia del PresentationPlayer.

Otros Miembros

NombreDescripción
delegate FrameTickHandler

Ejemplos

[C#]  
using (Presentation pres = new Presentation("pres.pptx"))  
{  
    using (var animationsGenerator = new PresentationAnimationsGenerator(pres))  
    {  
        // Reproducir animación a 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);  
        }  
        
        // Reproducir animación a 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);  
        }  
    }  
}  

Ver También