PowerPoint.ShapeType 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();
});
字段
callout = "Callout" | 该形状是标注。 |
chart = "Chart" | 形状是图表。 |
contentApp = "ContentApp" | 该形状是内容 Office 加载项。 |
diagram = "Diagram" | 形状是关系图。 |
freeform = "Freeform" | 该形状是一个任意多边形对象。 |
geometricShape = "GeometricShape" | 形状是几何形状,如矩形。 |
graphic = "Graphic" | 形状是图形。 |
group = "Group" | 该形状是包含子形状的组形状。 |
image = "Image" | 形状是图像。 |
ink = "Ink" | 形状是墨迹对象。 |
line = "Line" | 形状是一条线。 |
media = "Media" | 该形状是媒体对象。 |
model3D = "Model3D" | 该形状是 3D 模型。 |
ole = "Ole" | 该形状是一个 OLE (对象链接和嵌入) 对象。 |
placeholder = "Placeholder" | 形状是占位符。 |
smartArt = "SmartArt" | 该形状是 SmartArt 图形。 |
table = "Table" | 该形状是一个表格。 |
textBox = "TextBox" | 形状是一个文本框。 |
unsupported = "Unsupported" | 给定形状的类型不受支持。 |