GetEffective
PortionFormat.GetEffective 方法
获取应用了继承的有效部分格式数据。
public IPortionFormatEffectiveData GetEffective()
返回值
一个 IPortionFormatEffectiveData
。
示例
此示例演示如何获取某些有效的部分格式属性。
[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
IAutoShape shape = pres.Slides[0].Shapes[0] as IAutoShape;
IPortionFormatEffectiveData effectivePortionFormat = shape.TextFrame.Paragraphs[0].Portions[0].PortionFormat.GetEffective();
Console.WriteLine("拉丁字体: " + effectivePortionFormat.LatinFont.FontName);
Console.WriteLine("字体高度: " + effectivePortionFormat.FontHeight);
Console.WriteLine("填充类型: " + effectivePortionFormat.FillFormat.FillType);
}