FillFormatGetEffective Method

Gets effective fill formatting data with the inheritance applied.

Namespace:  Aspose.Slides
Assembly:  Aspose.Slides (in Aspose.Slides.dll) Version: 20.3.0.0 (20.3)
Syntax
public IFillFormatEffectiveData GetEffective()

Return Value

Type: IFillFormatEffectiveData
A IFillFormatEffectiveData.

Implements

IFillFormatGetEffective
Examples
This example demonstrates getting shape's effective fill format properties.
[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
    IFillFormatEffectiveData effectiveFillFormat = pres.Slides[0].Shapes[0].FillFormat.GetEffective();

    Console.WriteLine("Type: " + effectiveFillFormat.FillType);
    switch (effectiveFillFormat.FillType)
    {
        case FillType.Solid:
            Console.WriteLine("Fill color: " + effectiveFillFormat.SolidFillColor);
            break;
        case FillType.Pattern:
            Console.WriteLine("Pattern style: " + effectiveFillFormat.PatternFormat.PatternStyle);
            Console.WriteLine("Fore color: " + effectiveFillFormat.PatternFormat.ForeColor);
            Console.WriteLine("Back color: " + effectiveFillFormat.PatternFormat.BackColor);
            break;
        case FillType.Gradient:
            Console.WriteLine("Gradient direction: " + effectiveFillFormat.GradientFormat.GradientDirection);
            Console.WriteLine("Gradient stops count: " + effectiveFillFormat.GradientFormat.GradientStops.Count);
            break;
        case FillType.Picture:
            Console.WriteLine("Picture width: " + effectiveFillFormat.PictureFillFormat.Picture.Image.Width);
            Console.WriteLine("Picture height: " + effectiveFillFormat.PictureFillFormat.Picture.Image.Height);
            break;
    }
}
See Also