SetOutLine
Sets the text outline to the current text run.
Syntax
expression.SetOutLine(oStroke);
expression
- A variable that represents a ApiTextPr class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
oStroke | Required | ApiStroke | The stroke used to create the text outline. |
Returns
Example
In this example, the WordArt text has a text outline.
let doc = Api.GetDocument();
let textPr = Api.CreateTextPr();
textPr.SetFontSize(30);
textPr.SetBold(true);
textPr.SetCaps(true);
textPr.SetOutLine(Api.CreateStroke(0.2 * 36000, Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51))));
textPr.SetTextFill(Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61)));
textPr.SetFontFamily("Comic Sans MS");
let textArt = Api.CreateWordArt(textPr, "onlyoffice", "textArchUp", null, null, 0, 150 * 36000, 50 * 36000);
let paragraph = doc.GetElement(0);
paragraph.AddDrawing(textArt);