PowerPoint.ShapeFillType enum
図形の塗りつぶしの種類を指定します。
注釈
使用元
例
// 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();
});
フィールド
| gradient = "Gradient" | 図形にグラデーションの塗りつぶしを含めるように指定します。 |
| noFill = "NoFill" | 図形に塗りつぶしを使用しないように指定します。 |
| pattern = "Pattern" | 図形に塗りつぶしパターンを使用する必要があることを指定します。 |
| pictureAndTexture = "PictureAndTexture" | 図形に画像またはテクスチャの塗りつぶしを含めることを指定します。 |
| slideBackground = "SlideBackground" | 図形にスライドの背景を塗りつぶすように指定します。 |
| solid = "Solid" | 図形に規則的な塗りつぶしを使用するように指定します。 |