Compartilhar via


PowerPoint.ShapeFillType enum

Especifica o tipo de preenchimento de uma forma.

Comentários

[ Conjunto de API: PowerPointApi 1.4 ]

Exemplos

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/get-set-shapes.yaml

// Changes the selected shapes fill color to red.
await PowerPoint.run(async (context) => {
  const shapes: PowerPoint.ShapeScopedCollection = context.presentation.getSelectedShapes();
  const shapeCount = shapes.getCount();
  shapes.load("items/fill/type");
  await context.sync();
  shapes.items.map((shape) => {
    const shapeFillType = shape.fill.type as PowerPoint.ShapeFillType;
    console.log(`Shape ID ${shape.id} original fill type: ${shapeFillType}`);
    shape.fill.setSolidColor("red");
  });
  await context.sync();
});

Campos

gradient = "Gradient"

Especifica que a forma deve ter preenchimento com gradação.

noFill = "NoFill"

Especifica que a forma não deve ter preenchimento.

pattern = "Pattern"

Especifica que a forma deve ter preenchimento com padrão.

pictureAndTexture = "PictureAndTexture"

Especifica que a forma deve ter preenchimento com imagem ou textura.

slideBackground = "SlideBackground"

Especifica que a forma deve ter preenchimento do fundo do diapositivo.

solid = "Solid"

Especifica que a forma deve ter um preenchimento sólido normal.