Поделиться через


PowerPoint.ShapeType enum

Указывает тип фигуры.

Комментарии

[ Набор API: PowerPointApi 1.4 ]

Примеры

// 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 = 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();
});

Поля

geometricShape = "GeometricShape"

Фигура представляет собой геометрическую фигуру, например прямоугольник

group = "Group"

Фигура представляет собой групповую фигуру, содержащую вложенные фигуры

image = "Image"

Фигура является изображением

line = "Line"

Фигура представляет собой линию

table = "Table"

Фигура представляет собой таблицу

unsupported = "Unsupported"

Тип данной фигуры не поддерживается.