PresentationAnimationsGenerator
内容
[
隐藏
]PresentationAnimationsGenerator 类
表示 Presentation 中动画的生成器。
public class PresentationAnimationsGenerator : IDisposable
构造函数
| 名称 | 描述 |
|---|---|
| PresentationAnimationsGenerator(Presentation) | 创建 PresentationAnimationsGenerator 的新实例。 |
| PresentationAnimationsGenerator(Size) | 创建 PresentationAnimationsGenerator 的新实例。 |
属性
| 名称 | 描述 |
|---|---|
| DefaultDelay { get; set; } | 获取或设置默认延迟时间[ms]。 |
| ExportedSlides { get; } | 获取导出幻灯片的数量。 |
| IncludeHiddenSlides { get; set; } | 获取或设置是否应包括隐藏的幻灯片。 |
方法
| 名称 | 描述 |
|---|---|
| Dispose() | 释放 PresentationAnimationsGenerator 的实例。 |
| Run(IEnumerable<ISlide>) | 为每个幻灯片运行动画事件生成。 |
| Run(IEnumerable<ISlide>, int, FrameTickHandler) | 为每个幻灯片运行动画事件生成。 |
字段
| 名称 | 描述 |
|---|---|
| readonly FrameSize | 获取帧大小。 |
事件
| 名称 | 描述 |
|---|---|
| event NewAnimation | 表示已生成新动画的事件。 |
示例
[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);
}
}
另请参见
- 命名空间 Aspose.Slides.Export
- 程序集 Aspose.Slides