GetBasePlaceholder
Shape.GetBasePlaceholder 方法
返回基本占位符形状(当前形状继承的布局和/或母版幻灯片中的形状)。如果当前形状未继承,则返回 null。
public IShape GetBasePlaceholder()
示例
[C#]
// 获取占位符形状的所有(母版/布局/幻灯片)动画效果
using (Presentation pres = new Presentation("sample.pptx"))
{
ISlide slide = pres.Slides[0];
IShape shape = slide.Shapes[0];
IEffect[] shapeEffects = slide.Timeline.MainSequence.GetEffectsByShape(shape);
IShape layoutShape = shape.GetBasePlaceholder();
IEffect[] layoutShapeEffects = slide.LayoutSlide.Timeline.MainSequence.GetEffectsByShape(layoutShape);
IShape masterShape = layoutShape.GetBasePlaceholder();
IEffect[] masterShapeEffects = slide.LayoutSlide.MasterSlide.Timeline.MainSequence.GetEffectsByShape(masterShape);
}
另请参阅
- interface IShape
- class Shape
- namespace Aspose.Slides
- assembly Aspose.Slides