FillFormatGetEffective Method |
Namespace: Aspose.Slides
[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; } }