GetEffective
Метод FillFormat.GetEffective
Получает эффективные данные форматирования заливки с примененным наследованием.
public IFillFormatEffectiveData GetEffective()
Значение Возврата
Примеры
Этот пример демонстрирует получение эффективных свойств формата заливки фигуры.
[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
IFillFormatEffectiveData effectiveFillFormat = pres.Slides[0].Shapes[0].FillFormat.GetEffective();
Console.WriteLine("Тип: " + effectiveFillFormat.FillType);
switch (effectiveFillFormat.FillType)
{
case FillType.Solid:
Console.WriteLine("Цвет заливки: " + effectiveFillFormat.SolidFillColor);
break;
case FillType.Pattern:
Console.WriteLine("Стиль узора: " + effectiveFillFormat.PatternFormat.PatternStyle);
Console.WriteLine("Цвет переднего плана: " + effectiveFillFormat.PatternFormat.ForeColor);
Console.WriteLine("Цвет фона: " + effectiveFillFormat.PatternFormat.BackColor);
break;
case FillType.Gradient:
Console.WriteLine("Направление градиента: " + effectiveFillFormat.GradientFormat.GradientDirection);
Console.WriteLine("Количество остановок градиента: " + effectiveFillFormat.GradientFormat.GradientStops.Count);
break;
case FillType.Picture:
Console.WriteLine("Ширина изображения: " + effectiveFillFormat.PictureFillFormat.Picture.Image.Width);
Console.WriteLine("Высота изображения: " + effectiveFillFormat.PictureFillFormat.Picture.Image.Height);
break;
}
}
См. Также
- интерфейс IFillFormatEffectiveData
- класс FillFormat
- пространство имен Aspose.Slides
- сборка Aspose.Slides