SetOutLine
设置指定图形对象的轮廓属性。
语法
expression.SetOutLine(oStroke);
expression - 表示 ApiDrawing 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| oStroke | 必需 | ApiStroke | 用于创建图形对象轮廓的笔触。 |
返回值
boolean
示例
此示例设置指定图形对象的轮廓属性。
// How to outline the drawing with the stroke.
// Set the borders of the shape.
let worksheet = Api.GetActiveSheet();
let fill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
let stroke = Api.CreateStroke(0, Api.CreateNoFill());
let drawing1 = worksheet.AddShape("cube", 90 * 36000, 27 * 36000, fill, stroke, 0, 2 * 36000, 0, 3 * 36000);
stroke = Api.CreateStroke(36000, Api.CreateSolidFill(Api.CreateRGBColor(51, 51, 51)));
drawing1.SetOutLine(stroke);