Get Started
Documentation

CreateRadialGradientFill

CreateRadialGradientFill(aGradientStop) → {ApiFill}

Create a radial gradient fill which allows to fill the object using a selected radial gradient as the object background.

Parameters:

Name Type Description
aGradientStop Array The array of gradient color stops measured in 1000th of percent.

Returns:

Type
ApiFill

Example

Copy code
builder.CreateFile("pptx");
var oPresentation = Api.GetPresentation();
var oSlide = oPresentation.GetSlideByIndex(0);
oGs1 = Api.CreateGradientStop(Api.CreateRGBColor(255, 224, 204), 0);
oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(255, 164, 101), 100000);
oFill = Api.CreateRadialGradientFill([oGs1, oGs2]);
oSlide.SetBackground(oFill);
builder.SaveFile("pptx", "CreateRadialGradientFill.pptx");
builder.CloseFile();

Resulting document