SetShd
Specifies the shading applied to the contents of the current text run.
Syntax
expression.SetShd(sType, r, g, b);
expression
- A variable that represents a ApiRun class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sType | Required | ShdType | The shading type applied to the contents of the current text run. | |
r | Required | byte | Red color component value. | |
g | Required | byte | Green color component value. | |
b | Required | byte | Blue color component value. |
Returns
Example
This example specifies the shading applied to the contents of the current text run.
let doc = Api.GetDocument();
let textPr = doc.GetDefaultTextPr();
textPr.SetShd("clear", 255, 111, 61);
let paragraph = doc.GetElement(0);
paragraph.AddText("A sample text with the shading set to orange.");