Radial gradients do not work (when saving in PPT "97-2003 powerpoint format")

shape is not filled with a radial gradient when executing the following code, shape is filled with a solid color, viewing properties of shape in powerpoint reveal that fill type of shape is solid.

shape.LineFormat.Width = 1f;
var c = Color.FromArgb(convertBGRToRGB(color));
var c2 = Color.FromArgb(c.A,
(int) (c.R*0.8), (int) (c.G*0.8), (int) (c.B*0.8));
shape.LineFormat.FillFormat.SolidFillColor.Color = c;
shape.LineFormat.FillFormat.FillType = FillType.Solid;

shape.FillFormat.FillType = FillType.Gradient;
shape.FillFormat.GradientFormat.GradientShape = GradientShape.Radial;

//Set the Gradient Direction
shape.FillFormat.GradientFormat.GradientDirection = GradientDirection.FromCenter;
shape.FillFormat.GradientFormat.GradientStops.Add((float) 1.0, c);
shape.FillFormat.GradientFormat.GradientStops.Add((float) 0, c2);

changing from radial to linear works, but i require a radial fill

Hi Scott,

I have observed the sample code shared by you and suggest you to please try using Aspose.Slides for .NET 15.6.0 on your end. If there is still an issue then please share the source presentation, generated presentation, desired presentation and working sample project reproducing the issue. I will be able to investigate the issue further on my end once the requested information will be shared.

Many Thanks,

the desired and generated can be found here


https://brainworks.sharefile.com/d-sd56862cbc884847b

the gradient fill in the red balls in the desired is what is not working

Hi Scott,

I have observed your requirements and suggest you to please try using the following sample code to get the desired gradient effects. I hope this will be helpful. Please share, if I may help you further in this regard.

public static void testShapeFill()
{

Presentation pres = new Presentation();

ISlide slide = pres.Slides[0];

//Creating the default chart
IAutoShape ashape=slide.Shapes.AddAutoShape(ShapeType.Ellipse,100,100,100,100);

ashape.FillFormat.FillType=FillType.Gradient;

ashape.FillFormat.GradientFormat.GradientShape=GradientShape.Radial;
//Set the Gradient Direction
ashape.FillFormat.GradientFormat.GradientDirection = GradientDirection.FromCenter;
ashape.FillFormat.GradientFormat.GradientStops.Add(0.0f, Color.FromArgb(255,71,71));
ashape.FillFormat.GradientFormat.GradientStops.Add(100f, Color.FromArgb(168, 0, 0));
ashape.LineFormat.FillFormat.FillType = FillType.Solid;
ashape.LineFormat.FillFormat.SolidFillColor.Color = Color.Red;

pres.Save(“D:\Aspose Data\GradientEffect.pptx”, SaveFormat.Pptx);
}

Many Thanks,

no, sorry, does not work, still get just red solid fill balls.


they work fine when i use the interop

shape.Line.Weight = 1f;
shape.Line.ForeColor.RGB = color;
shape.Line.Visible = MsoTriState.msoTrue;
shape.Fill.ForeColor.RGB = color;
shape.Fill.OneColorGradient(MsoGradientStyle.msoGradientFromCenter, 2, 0.7f);

also it is important that the saving format is ppt not pptx, there are other systems that rely on the powerpoi nt being in ppt and not pptx format, are there incompatibilites with aspose slides when saving in ppt format? i see all your examples are saving in pptx format?

Hi Scott,

I request you to please try using the code sample shared by me using Aspose.Slides for .NET 15.6.0. I am able to get the gradient effects and for your kind reference, I have attached the generated presentation as well as snapshot displaying the applied effect. I hope this will be helpful.

Many Thanks,

i have ran your code and it does not work with 15.6.0.


please note i need to save in PPT not PPTX

when i chage your code to save in PPT from PPTX by modifying the following line
pres.Save(“c:\GradientEffect.pptx”, SaveFormat.Pptx);
to
pres.Save(“c:\GradientEffect.ppt”, SaveFormat.Ppt);

The radial gradient fill does NOT work for PPT (powerpoint 97 to 2003) format files saved by aspose slides.

It apears that there is possibly an error in the saving/encoding routine for PPT that doesnt not save the radial effect, the radial effect is available in ppt format, if I modify the ppt by hand then save as PPT, or generate with the office interop and save as PPT the radial gradient is saved without problem.

Please try executing your code, but saving in PPT format which is one of my primary requirements.

There are numerous systems in the chain that rely on the file format being PPT “powerpoint format 97 to 2003”



Hi Scott,


I have been able to observe that when saving the presentation as PPT the gradient effects are not working. An issue with ID SLIDESNET-36659 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

No problem, any ideas of a timeframe, i have a client chomping at the bit for an estimated deployment date

Hi Scott,

I like to share that the issue has just been created and is in waiting queue. Our product team will schedule and investigate the issue for investigation and resolution on its due turn. After the investigation carried by our product team I will then be able to share feedback with you in term of ETA. I will really appreciate your patience till the time our product schedule and investigate the issue.

Many Thanks,

i need a basic time frame, is the exepcted fix time days, weeks or months.


i have a client waiting fro this so we can change over from interop to aspose.

if the time frame is goign to be long we need to start investigating alternatives.

thanks in advance

Hi Scott,

I have verified from our issue tracking system and regret to share that at present the issue still unresolved. I have discussed with our product team as well and they will possibly be reviewing this issue in September tentatively. We will share the good news with you as soon as the issue will be resolved.

Many Thanks,

is there any advancement of this issue? any indication of when it coud be resolved?

Hi Scott,

I have verified from our issue tracking system and like to share that the issue is under investigation and our product team is working over that. We will share the good news with you as soon as the issue will be fixed.

Many Thanks,