GetEffective
EffectFormat.GetEffective method
在应用了继承的情况下获取有效的格式化数据。
public IEffectFormatEffectiveData GetEffective()
返回值
例子
这个例子演示了获取一些形状的有效效果属性。
[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
IEffectFormatEffectiveData effectiveEffectFormat = pres.Slides[0].Shapes[0].EffectFormat.GetEffective();
if (effectiveEffectFormat.IsNoEffects)
{
Console.WriteLine("The shape has not effects applied.");
}
else
{
if (effectiveEffectFormat.BlurEffect != null)
Console.WriteLine("Blur effect radius: " + effectiveEffectFormat.BlurEffect.Radius);
if (effectiveEffectFormat.FillOverlayEffect != null)
Console.WriteLine("Fill overlay effect fill type: " + effectiveEffectFormat.FillOverlayEffect.FillFormat.FillType);
if (effectiveEffectFormat.GlowEffect != null)
Console.WriteLine("Glow effect color: " + effectiveEffectFormat.GlowEffect.Color);
if (effectiveEffectFormat.InnerShadowEffect != null)
Console.WriteLine("Inner shadow effect shadow color: " + effectiveEffectFormat.InnerShadowEffect.ShadowColor);
if (effectiveEffectFormat.OuterShadowEffect != null)
Console.WriteLine("Outer shadow effect shadow color: " + effectiveEffectFormat.OuterShadowEffect.ShadowColor);
if (effectiveEffectFormat.PresetShadowEffect != null)
Console.WriteLine("Preset shadow effect shadow color: " + effectiveEffectFormat.PresetShadowEffect.ShadowColor);
if (effectiveEffectFormat.ReflectionEffect != null)
Console.WriteLine("Reflection effect distance: " + effectiveEffectFormat.ReflectionEffect.Distance);
if (effectiveEffectFormat.SoftEdgeEffect != null)
Console.WriteLine("Soft edge effect radius: " + effectiveEffectFormat.SoftEdgeEffect.Radius);
}
}
也可以看看
- interface IEffectFormatEffectiveData
- class EffectFormat
- 命名空间 Aspose.Slides
- 部件 Aspose.Slides