Word.ShapeFillType enum
図形の塗りつぶし の種類を 指定します。
注釈
[ API set: WordApiDesktop 1.2 ]
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/45-shapes/manage-geometric-shapes.yaml
await Word.run(async (context) => {
// Gets the color fill properties of the first moon found in the document body.
const moon: Word.Shape = context.document.body.shapes
.getByGeometricTypes([Word.GeometricShapeType.moon])
.getFirstOrNullObject();
moon.load("fill");
await context.sync();
if (moon.isNullObject) {
console.log("No moons found in the document body.");
return;
}
const moonFill: Word.ShapeFill = moon.fill;
const moonFillType = moonFill.type as Word.ShapeFillType;
console.log("Color fill properties of the first moon found in the document body:");
console.log(`\tForeground color: ${moonFill.foregroundColor}`);
console.log(`\tBackground color: ${moonFill.backgroundColor}`);
console.log(`\tTransparency: ${moonFill.transparency}`);
console.log(`\tFill type: ${moonFillType}`);
});
フィールド
| gradient = "Gradient" | 塗りつぶし (グラデーション) |
| mixed = "Mixed" | 塗りつぶし (混在) |
| noFill = "NoFill" | 塗りつぶしなし。 |
| pattern = "Pattern" | パターンの塗りつぶし。 |
| picture = "Picture" | 図の塗りつぶし |
| solid = "Solid" | 塗りつぶし (単色) |
| texture = "Texture" | テクスチャ塗りつぶし。 |