Get Started
Usage API
More information

CreateStroke

CreateStroke(nWidth, oFill) → { ApiStroke }

Creates a stroke adding shadows to the element.

Parameters:

Name Type Description
nWidth EMU

The width of the shadow measured in English measure units.

oFill ApiFill

The fill type used to create the shadow.

Returns:

Type
ApiStroke

Example

Copy code
builder.CreateFile("xlsx");
oPresentation = Api.GetPresentation();
oSlide = oPresentation.GetSlideByIndex(0);
oSlide.RemoveAllObjects();
oGs1 = Api.CreateGradientStop(Api.CreateRGBColor(255, 224, 204), 0);
oGs2 = Api.CreateGradientStop(Api.CreateRGBColor(255, 164, 101), 100000);
oFill = Api.CreateLinearGradientFill([oGs1, oGs2], 5400000);
oFill1 = Api.CreateSolidFill(Api.CreateRGBColor(255, 255, 0));
oStroke = Api.CreateStroke(3 * 36000, oFill1);
oShape = Api.CreateShape("flowChartMagneticTape", 300 * 36000, 130 * 36000, oFill, oStroke);
oSlide.AddObject(oShape);
builder.SaveFile("xlsx", "CreateStroke.xlsx");
builder.CloseFile();

Resulting document