CreateStroke
Create 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("docx");
oDocument = Api.GetDocument();
oParagraph = oDocument.GetElement(0);
oRGBColor = Api.CreateRGBColor(0, 255, 0);
oFill = Api.CreateSolidFill(oRGBColor);
oStroke = Api.CreateStroke(5 * 36000, Api.CreateSolidFill(Api.CreateRGBColor(255, 224, 204)));
oDrawing = Api.CreateShape("roundRect", 5930900, 395605, oFill, oStroke);
oParagraph.AddDrawing(oDrawing);
builder.SaveFile("docx", "CreateStroke.docx");
builder.CloseFile();
Resulting document