添加反射效果
让我们创建一个新的Word文档,并向其中添加带有反射效果的文本。 最初,创建了一个名为doc的新WordDocument对象。 一个TextStyle对象随后被实例化,并通过设置其TextEffect属性为一个新的Reflection对象来配置包含反射效果。 带有反射效果的“Hello World”样式文本已添加到文档中。 最后,文档被保存了。 有关更多示例和演示,请访问以下文章: 如何为文本添加反射效果.
using IronWord; using IronWord.Models; // Create new Word document WordDocument doc = new WordDocument(); // Create and configure text style TextStyle textStyle = new TextStyle(); textStyle.TextEffect = new TextEffect() { ReflectionEffect = new Reflection(), }; // Add text with style doc.AddText("Hello World").Style = textStyle; // Export new Word document doc.SaveAs("reflectionEffect.docx");
Imports IronWord Imports IronWord.Models ' Create new Word document Private doc As New WordDocument() ' Create and configure text style Private textStyle As New TextStyle() textStyle.TextEffect = New TextEffect() With {.ReflectionEffect = New Reflection()} ' Add text with style doc.AddText("Hello World").Style = textStyle ' Export new Word document doc.SaveAs("reflectionEffect.docx")
Install-Package IronWord
让我们创建一个新的Word文档,并向其中添加带有反射效果的文本。 最初,创建了一个名为doc的新WordDocument对象。 一个TextStyle对象随后被实例化,并通过设置其TextEffect属性为一个新的Reflection对象来配置包含反射效果。 带有反射效果的“Hello World”样式文本已添加到文档中。 最后,文档被保存了。 有关更多示例和演示,请访问以下文章: 如何为文本添加反射效果.