Gradient effects are not getting applied properly (C# .NET)

I’ve been trying to get an autoshape to show a gradient correctly, and I’ve run into some odd behaviour.
I create a shape using the code below, save the presentation and open it- it has a barely perceptible gradient.
In Powerpoint, I set the shape’s fill to “solid fill”, then back to “gradient fill”, without changing anything else, and the gradient becomes much clearer.

I attach an image showing the before/after, as well as the code used to produce the Before version.

    var x = sld.Shapes.AddAutoShape(ShapeType.MultiplyMath, 100, 100, 50, 50);
x.FillFormat.FillType = FillType.Gradient;
x.FillFormat.GradientFormat.GradientShape = GradientShape.Linear;
x.FillFormat.GradientFormat.GradientDirection = GradientDirection.FromCorner1;
x.FillFormat.GradientFormat.GradientStops.Clear();
x.FillFormat.GradientFormat.GradientStops.Add(0f, Color.Black);
x.FillFormat.GradientFormat.GradientStops.Add(0.5f, Color.Gray);
x.FillFormat.GradientFormat.GradientStops.Add(1f,Color.White);
x.FillFormat.GradientFormat.LinearGradientAngle = -90;
x.Adjustments[0].RawValue = 20000;
x.LineFormat.FillFormat.FillType = FillType.NoFill;
x.EffectFormat.EnableOuterShadowEffect();
var shadow = x.EffectFormat.OuterShadowEffect;
shadow.BlurRadius = 3.15;
shadow.Distance = 1.8;
shadow.ShadowColor.Color = Color.FromArgb(85, 0, 0, 0);
shadow.Direction = 90;

Is there a way to get the After version using Aspose? If so, how?AsposeBeforeAndAfter.png (18.1 KB)

@MMRGFW,

I have worked withe sample code shared by you and have been able to observe the issue specified. An issue with ID SLIDESNET-41075 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 notified once the issue will be fixed.

The issues you have found earlier (filed as SLIDESNET-41075) have been fixed in this update.