没有找到合适的产品?
联系客服协助选型:023-68661681
提供3000多款全球软件/控件产品
针对软件研发的各个阶段提供专业培训与技术咨询
根据客户需求提供定制化的软件开发服务
全球知名设计软件,显著提升设计质量
打造以经营为中心,实现生产过程透明化管理
帮助企业合理产能分配,提高资源利用率
快速打造数字化生产线,实现全流程追溯
生产过程精准追溯,满足企业合规要求
以六西格玛为理论基础,实现产品质量全数字化管理
通过大屏电子看板,实现车间透明化管理
对设备进行全生命周期管理,提高设备综合利用率
实现设备数据的实时采集与监控
利用数字化技术提升油气勘探的效率和成功率
钻井计划优化、实时监控和风险评估
提供业务洞察与决策支持实现数据驱动决策
原创|行业资讯|编辑:李显亮|2019-09-02 14:43:36.397|阅读 176 次
概述:Aspose.Slides for .NET是独特的演示处理API,使应用程序能够读取,编写,修改和转换PowerPoint演示文稿。Aspose.Slides for .NET更新至最新版v19.8,引入了用于获得有效值的新API,从而获取“本地”值和“有效”值。
# 界面/图表报表/文档/IDE等千款热门软控件火热销售中 >>
Aspose.Slides for .NET是独特的演示处理API,使应用程序能够读取,编写,修改和转换PowerPoint演示文稿。作为独立的API,它提供了管理PowerPoint关键功能的功能,例如管理文本,形状,表格和动画,向幻灯片添加音频和视频,预览幻灯片等等。
Aspose.Slides for .NET更新至最新版v19.8,引入了用于获得有效值的新API,从而获取“本地”值和“有效”值。下面我们一起来了解一下具体内容吧!>>欢迎下载Aspose.Slides for .NET v19.8体验
新的功能支持通过IPortion.PortionFormat在不同级别的表示结构层次结构中设置文本部分的属性。以下是其中一些:
对于任何这些级别,直接在此级别设置的值称为“本地”。在任何级别,可以定义或省略“本地”值。但最后,当应用程序(使用Aspose.Slides甚至PowerPoint本身构建)需要知道该部分应该是什么样的时候(在图像导出或在屏幕上绘图时),它使用“有效”值 - 完全使用层次结构构建的已定义值集,可能的值覆盖最低层的每个级别以及硬编码到PowerPoint中的默认值。
“有效数据”对象本质上是不可变的-它们仅用于获取最终的组合信息。“本地数据“”对象是可变的-它们用于设置属性。
启动Aspose.Slides v19.8所需要的只是从您希望获得有效值的本地格式调用GetEffective()方法。下面列举个例子说明:
using (Presentation pres = new Presentation("MyPresentation.pptx")) { IAutoShape shape = pres.Slides[0].Shapes[0] as IAutoShape; ITextFrameFormat localTextFrameFormat = shape.TextFrame.TextFrameFormat; ITextFrameFormatEffectiveData effectiveTextFrameFormat = localTextFrameFormat.GetEffective(); IPortionFormat localPortionFormat = shape.TextFrame.Paragraphs[0].Portions[0].PortionFormat; IPortionFormatEffectiveData effectivePortionFormat = localPortionFormat.GetEffective(); }
注意:
GetEffective()方法已添加到ITextFrameFormat、ITextStyle、IParagraphFormat、IPortionFormat、IFillFormat、ILineFormat、IEffectFormat、IThreeDFormat、ITableFormat、IRowFormat、IColumnFormat、ICellFormat、IBackground 和ITheme接口。
这两个类都是抽象的,并在内部用于维护系统的统一有效值。AccessibleEffectiveData类是具有自己的继承层次结构的格式的有效数据类的基类。BaseEffectiveData类是AccessibleEffectiveData的基类,也是所有有效数据类的基类,它们没有自己的继承层次结构,并且作为更复杂的有效数据类的一部分。
以下是在不同的表示结构级别上设置本地字体高度值后,演示部分的有效字体高度值的代码。
using (Presentation pres = new Presentation()) { IAutoShape newShape = pres.Slides[0].Shapes.AddAutoShape(ShapeType.Rectangle, 100, 100, 400, 75, false); newShape.AddTextFrame(""); newShape.TextFrame.Paragraphs[0].Portions.Clear(); IPortion portion0 = new Portion("Sample text with first portion"); IPortion portion1 = new Portion(" and second portion."); newShape.TextFrame.Paragraphs[0].Portions.Add(portion0); newShape.TextFrame.Paragraphs[0].Portions.Add(portion1); Console.WriteLine("Effective font height just after creation:"); Console.WriteLine("Portion #0: " + portion0.PortionFormat.GetEffective().FontHeight); Console.WriteLine("Portion #1: " + portion1.PortionFormat.GetEffective().FontHeight); pres.DefaultTextStyle.GetLevel(0).DefaultPortionFormat.FontHeight = 24; Console.WriteLine("Effective font height after setting entire presentation default font height:"); Console.WriteLine("Portion #0: " + portion0.PortionFormat.GetEffective().FontHeight); Console.WriteLine("Portion #1: " + portion1.PortionFormat.GetEffective().FontHeight); newShape.TextFrame.Paragraphs[0].ParagraphFormat.DefaultPortionFormat.FontHeight = 40; Console.WriteLine("Effective font height after setting paragraph default font height:"); Console.WriteLine("Portion #0: " + portion0.PortionFormat.GetEffective().FontHeight); Console.WriteLine("Portion #1: " + portion1.PortionFormat.GetEffective().FontHeight); newShape.TextFrame.Paragraphs[0].Portions[0].PortionFormat.FontHeight = 55; Console.WriteLine("Effective font height after setting portion #0 font height:"); Console.WriteLine("Portion #0: " + portion0.PortionFormat.GetEffective().FontHeight); Console.WriteLine("Portion #1: " + portion1.PortionFormat.GetEffective().FontHeight); newShape.TextFrame.Paragraphs[0].Portions[1].PortionFormat.FontHeight = 18; Console.WriteLine("Effective font height after setting portion #1 font height:"); Console.WriteLine("Portion #0: " + portion0.PortionFormat.GetEffective().FontHeight); Console.WriteLine("Portion #1: " + portion1.PortionFormat.GetEffective().FontHeight); } // Output: // Effective font height just after creation: // Portion #0: 18 // Portion #1: 18 // Effective font height after setting entire presentation default font height: // Portion #0: 24 // Portion #1: 24 // Effective font height after setting paragraph default font height: // Portion #0: 40 // Portion #1: 40 // Effective font height after setting portion #0 font height: // Portion #0: 55 // Portion #1: 40 // Effective font height after setting portion #1 font height: // Portion #0: 55 // Portion #1: 18
*想要购买Aspose正版授权的朋友可以哦~
ASPOSE技术交流QQ群(642018183)已开通,各类资源及时分享,欢迎交流讨论!
扫描关注“慧聚IT”微信公众号,及时获取更多产品最新动态及最新资讯
本站文章除注明转载外,均为本站原创或翻译。欢迎任何形式的转载,但请务必注明出处、不得修改原文相关链接,如果存在内容上的异议请邮件反馈至chenjj@wqylolg.cn
慧都科技是Tech Soft 3D-HOOPS在中国区的唯一增值服务商,负责HOOPS与CEETRON试用,咨询,销售,技术支持,售后,旨在为企业提供一站式的3D开发解决方案。
本文将为大家介绍图表控件SciChart在数字化石油&天然气行业中的应用,欢迎下载最新版工具体验!
Excel 文件通常包含敏感的财务数据、业务报告或机密信息。在本指南中,我们将探讨使用 C#、Java 和 Python 以及在线实现基于代码的解决方案,有效地使用密码保护 Excel 文件。
SolidWorks eDrawings 通过 HOOPS 技术赋能多平台支持、模块化设计和功能扩展(如 AR/VR),推动制造业设计流程的创新与优化。
Aspose.Slides是第一个能在用户的应用程序中对PowerPoint文档进行管理的组件。
服务电话
重庆/ 023-68661681
华东/ 13452821722
华南/ 18100878085
华北/ 17347785263
客户支持
技术支持咨询服务
服务热线:400-700-1020
邮箱:sales@wqylolg.cn
关注我们
地址 : 重庆市九龙坡区火炬大道69号6幢