PowerPoint.SlideBackgroundGradientFillType enum
指定 PowerPoint.SlideBackgroundGradientFill 的渐变填充类型。
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/slide-management/get-set-background-fill.yaml
// Sets the background of the first selected slide to a linear gradient fill.
await PowerPoint.run(async (context) => {
const slide: PowerPoint.Slide = context.presentation.getSelectedSlides().getItemAt(0);
slide.background.fill.setGradientFill({
type: PowerPoint.SlideBackgroundGradientFillType.linear,
} as PowerPoint.SlideBackgroundGradientFillOptions);
await context.sync();
console.log("Background set to linear gradient fill.");
});
字段
| linear = "Linear" | 线性渐变填充。 |
| path = "Path" | 路径渐变填充。 |
| radial = "Radial" | 径向渐变填充。 |
| rectangular = "Rectangular" | 矩形渐变填充。 |
| shadeFromTitle = "ShadeFromTitle" | 标题渐变填充的阴影。 |
| unsupported = "Unsupported" | 不支持的渐变填充。 |