PowerPoint.ShapeFillType enum
図形の塗りつぶしの種類を指定します。
注釈
[ API セット: PowerPointApi 1.4 ]
例
// 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" | 図形に標準の塗りつぶしを指定します。 |