Spire.Presentation 6.4.5已发布。该版本支持通过流添加Video以及支持了添加自定义路径动画。此外,本次更新还增强了转换PPT到图片的功能,同时也修复了加载PPT文档时出现的问题。详情请阅读以下内容。
新功能:
- 支持通过流添加Video
AppendVideoMedia(Stream stream, RectangleF rectangle);
Presentation ppt = new Presentation();
IAutoShape shape = ppt.Slides[0].Shapes.AppendShape(ShapeType.Rectangle, new RectangleF(0, 0, 200, 200));
AnimationEffect effect = ppt.Slides[0].Timeline.MainSequence.
AddEffect(shape, AnimationEffectType.PathUser);
CommonBehaviorCollection common = effect.CommonBehaviorCollection;
AnimationMotion motion = (AnimationMotion)common[0];
motion.Origin = AnimationMotionOrigin.Layout;
motion.PathEditMode = AnimationMotionPathEditMode.Relative;
MotionPath moinPath = new MotionPath();
moinPath.Add(MotionCommandPathType.MoveTo, new PointF[] { new PointF(0, 0) }, MotionPathPointsType.CurveAuto, true);
moinPath.Add(MotionCommandPathType.LineTo, new PointF[] { new PointF(0.1f, 0.1f) }, MotionPathPointsType.CurveAuto, true);
moinPath.Add(MotionCommandPathType.LineTo, new PointF[] { new PointF(-0.1f, 0.2f) }, MotionPathPointsType.CurveAuto, true);
moinPath.Add(MotionCommandPathType.End, new PointF[] { }, MotionPathPointsType.CurveStraight, true);
motion.Path = moinPath;
ppt.SaveToFile(outputFile, FileFormat.Pptx2010);
ppt.Dispose();
问题修复:
- 修复了转换PPTX到图片,阴影效果错误的问题
- 修复了设置动画持续时间不正确的问题
- 修复了转换PPTX到图片,内容不正确的问题
- 修复了加载PPTX文档抛异常“System.NullReferenceException”的问题
- 修复了加载PPT文档抛异常“System.IndexOutOfRangeException”的问题
获取Spire.Presentation 6.4.5请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html