PowerPoint.ShapeLineDashStyle 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.dashStyle = PowerPoint.ShapeLineDashStyle.dashDot;
}
});
await context.sync();
});
字段
| dash = "Dash" | 短划线图案。 |
| dashDot = "DashDot" | 虚线点线模式。 |
| dashDotDot = "DashDotDot" | 短划线点点线图案。 |
| longDash = "LongDash" | 长短划线图案。 |
| longDashDot = "LongDashDot" | 长短划线点线模式。 |
| longDashDotDot = "LongDashDotDot" | 长短划线点点线模式。 |
| roundDot = "RoundDot" | 圆点线图案。 |
| solid = "Solid" | 实线模式。 |
| squareDot = "SquareDot" | 方形点线图案。 |
| systemDash = "SystemDash" | 系统短划线模式。 |
| systemDashDot = "SystemDashDot" | 系统短划线点线模式。 |
| systemDot = "SystemDot" | 系统点线模式。 |