Spire.Presentation 6.11.2已发布。本次更新支持获取表格单元格的填充颜色的功能,同时也支持设置图表数据标签的数据源的功能。此外,该版本还增强了转换PowerPoint到图片的功能,并且还修复了插入圆柱体等时出现的问题。详情请阅读以下内容。
新功能:
- 支持获取表格单元格的填充颜色
table.TableRows[i][j].DisplayColor;
Presentation ppt = new Presentation();
IChart chart = ppt.Slides[0].Shapes.AppendChart(ChartType.ColumnStacked, new RectangleF(100, 100, 500, 400));
CellRange cellRange = chart.ChartData["F1"];
cellRange.Text = "aaa";
cellRange = chart.ChartData["F2"];
cellRange.Text = "bbb";
cellRange = chart.ChartData["F3"];
cellRange.Text = "ccc";
cellRange = chart.ChartData["F4"];
cellRange.Text = "ddd";
chart.Series[0].DataLabelRanges = chart.ChartData["F1", "F4"];
ChartDataLabel dataLabel1 = chart.Series[0].DataLabels.Add();
dataLabel1.ID = 0;
dataLabel1.LabelValueVisible = true;
dataLabel1.ShowDataLabelsRange = true;
foreach (AnimationEffect effect in shape.Slide.Timeline.MainSequence)
{
if (effect.ShapeTarget.Equals(shape as Spire.Presentation.Shape))
{
MotionPath path = ((AnimationMotion)effect.CommonBehaviorCollection[0]).Path;
foreach (MotionCmdPath motionCmdPath in path)
{
PointF[] points = motionCmdPath.Points;
MotionCommandPathType type = motionCmdPath.CommandType;
}
}
}
Image image = shape.SaveAsImage();
问题修复:
- 修复了新增的shape没有默认线宽和颜色的问题
- 修复了PPT转图片不够清晰的问题
- 修复了无法获取主题的背景色的问题
- 修复了转换到图形到图片内容不正确的问题
- 修复了获取到的文字颜色错误的问题
- 修复了插入的圆柱体不正确的问题
获取Spire.Presentation 6.11.2请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html