Help me, it fails to do so when I tried to effect.
Hi Huy,
I have observed our requirement for setting the shadow effect for the fonts. Please try using the following sample code on your end to serve the purpose on your end.
public static void TestShadow()
{
Presentation Pres = new Presentation();
//Get first slide
ISlide Slide = Pres.Slides[0];
//Add an AutoShape of Rectangle type
IAutoShape aShp = Slide.Shapes.AddAutoShape(ShapeType.Rectangle, 150, 75, 150, 50);
//Add TextFrame to the Rectangle
aShp.AddTextFrame(“Aspose TextBox”);
// Disable shape fill in case we want to get shadow of text.
aShp.FillFormat.FillType=FillType.NoFill;
// Add outer shadow and set all necessary parameters
aShp.EffectFormat.EnableOuterShadowEffect();
IOuterShadow Shadow = aShp.EffectFormat.OuterShadowEffect;
Shadow.BlurRadius=4.0;
Shadow.Direction=45;
Shadow.Distance=3;
Shadow.RectangleAlign=RectangleAlignment.TopLeft;
Shadow.ShadowColor.Color=Color.Black;
//Write the presentation to disk
Pres.Save(“d:\Aspose Data\ShadowPres.pptx”,SaveFormat.Pptx);
Process.Start(“d:\Aspose Data\ShadowPres.pptx”);
}
Many Thanks,
Thank you very much, it works well.