GetEffective
FillFormat.GetEffective-Methode
Ruft effektive Füllformatierungsdaten mit den angewandten Vererbungen ab.
public IFillFormatEffectiveData GetEffective()
Rückgabewert
Beispiele
Dieses Beispiel demonstriert das Abrufen der effektiven Füllformat-Eigenschaften einer Form.
[C#]
using (Presentation pres = new Presentation(@"MyPresentation.pptx"))
{
IFillFormatEffectiveData effectiveFillFormat = pres.Slides[0].Shapes[0].FillFormat.GetEffective();
Console.WriteLine("Typ: " + effectiveFillFormat.FillType);
switch (effectiveFillFormat.FillType)
{
case FillType.Solid:
Console.WriteLine("Füllfarbe: " + effectiveFillFormat.SolidFillColor);
break;
case FillType.Pattern:
Console.WriteLine("Musterstil: " + effectiveFillFormat.PatternFormat.PatternStyle);
Console.WriteLine("Vordergrundfarbe: " + effectiveFillFormat.PatternFormat.ForeColor);
Console.WriteLine("Hintergrundfarbe: " + effectiveFillFormat.PatternFormat.BackColor);
break;
case FillType.Gradient:
Console.WriteLine("Gradientrichtung: " + effectiveFillFormat.GradientFormat.GradientDirection);
Console.WriteLine("Anzahl der Gradientenstopps: " + effectiveFillFormat.GradientFormat.GradientStops.Count);
break;
case FillType.Picture:
Console.WriteLine("Bildbreite: " + effectiveFillFormat.PictureFillFormat.Picture.Image.Width);
Console.WriteLine("Bildhöhe: " + effectiveFillFormat.PictureFillFormat.Picture.Image.Height);
break;
}
}
Siehe auch
- Schnittstelle IFillFormatEffectiveData
- Klasse FillFormat
- Namensraum Aspose.Slides
- Assembly Aspose.Slides