PowerPoint.SlideBackgroundGradientFillOptions interface
表示用于设置 PowerPoint.SlideBackground 渐变填充的可用选项。
注解
示例
// 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.");
});
属性
| type | 如果提供,则指定渐变填充的类型。 |
属性详细信息
type
如果提供,则指定渐变填充的类型。
type?: PowerPoint.SlideBackgroundGradientFillType | "Unsupported" | "Linear" | "Radial" | "Rectangular" | "Path" | "ShadeFromTitle";
属性值
PowerPoint.SlideBackgroundGradientFillType | "Unsupported" | "Linear" | "Radial" | "Rectangular" | "Path" | "ShadeFromTitle"