Word.BevelType enum
指示 Word 的斜台类型。ThreeDimensionalFormat 对象。
注解
使用方
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/apply-bevel-to-text.yaml
if (!Office.context.requirements.isSetSupported("WordApiDesktop", "1.3")) {
console.error("This sample requires WordApiDesktop 1.3 or later.");
return;
}
await Word.run(async (context) => {
const paragraph: Word.Paragraph = context.document.body.insertParagraph(
"Beveled text",
Word.InsertLocation.start,
);
paragraph.font.size = 48;
paragraph.font.bold = true;
const threeDimensionalFormat: Word.ThreeDimensionalFormat = paragraph.font.threeDimensionalFormat;
threeDimensionalFormat.isVisible = true;
threeDimensionalFormat.bevelTopType = Word.BevelType.circle;
threeDimensionalFormat.bevelTopDepth = 6;
threeDimensionalFormat.bevelTopInset = 6;
threeDimensionalFormat.load("bevelTopType,bevelTopDepth,bevelTopInset");
await context.sync();
console.log("Applied bevel formatting:", {
type: threeDimensionalFormat.bevelTopType,
depth: threeDimensionalFormat.bevelTopDepth,
inset: threeDimensionalFormat.bevelTopInset,
});
});
字段
| angle = "angle" | 表示角度斜角。 |
| artDeco = "artDeco" | 表示装饰艺术斜面。 |
| circle = "circle" | 表示圆形斜面。 |
| convex = "convex" | 表示凸斜角。 |
| coolSlant = "coolSlant" | 表示冷斜斜面。 |
| cross = "cross" | 表示十字斜面。 |
| divot = "divot" | 表示草皮斜角。 |
| hardEdge = "hardEdge" | 表示硬边斜角。 |
| mixed = "mixed" | 表示混合棱台类型。 |
| none = "none" | 表示无斜角。 |
| relaxedInset = "relaxedInset" | 表示宽松的插图斜角。 |
| riblet = "riblet" | 表示肋斜角。 |
| slope = "slope" | 表示斜坡斜角。 |
| softRound = "softRound" | 表示柔和的圆形棱台。 |