PowerPoint.ShapeLineStyle enum
指定线型。
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/get-shapes-by-type.yaml
// Changes the dash style of every line in the slide.
await PowerPoint.run(async (context) => {
// Get the type of shape for every shape in the collection.
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
shapes.load("type");
await context.sync();
// Change the dash style for shapes of the type `line`.
shapes.items.forEach((shape) => {
if (shape.type === PowerPoint.ShapeType.line) {
shape.lineFormat.style = PowerPoint.ShapeLineStyle.thickThin;
shape.lineFormat.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot;
}
});
await context.sync();
});
字段
| single = "Single" | 单线。 |
| thickBetweenThin = "ThickBetweenThin" | 粗线每一侧各带一条细线。 |
| thickThin = "ThickThin" | 粗线位于细线旁边。 对于水平线,粗线位于细线上方。 对于垂直线,粗线位于细线的左侧。 |
| thinThick = "ThinThick" | 粗线位于细线旁边。 对于水平线,粗线位于细线下方。 对于垂直线,粗线位于细线的右侧。 |
| thinThin = "ThinThin" | 双细线。 |