テキストにグロー効果を加える方法

This article was translated from English: Does it need improvement?
Translated
View the article in English

文字のグロー効果は、文字の周りに輝くオーラを作り出す視覚効果である。 この効果により、テキストが発光しているように見え、読みやすさを向上させ、注意を引くことができるソフトな発光アウトラインを作成することができます。

 用 C# NuGet ライブラリ

でインストール NuGet

Install-Package IronWord
 用 C# NuGet ライブラリ

でインストール NuGet

Install-Package IronWord
または
Java PDF JAR(ジャバPDF JAR)

ダウンロード DLL (ディーエルエル)

DLLをダウンロード

プロジェクトに手動でインストールする

今日からプロジェクトでIronPDFを使い始めましょう。無料のトライアルをお試しください。

最初のステップ:
green arrow pointer

チェックアウト IronWord オン Nuget 迅速なインストールと展開のために。8百万以上のダウンロード数により、をC#で変革しています。

 用 C# NuGet ライブラリ nuget.org/packages/IronWord/
Install-Package IronWord

グロー効果を加える

テキストのグロー効果を指定するには、まずGlowオブジェクトを作成して設定します。 次に、このGlowオブジェクトからTextEffectオブジェクトを作成します。 最後に、TextEffectをテキストのTextEffectプロパティに割り当てます。

:path=/static-assets/word/content-code-examples/how-to/text-effect-glow-effect.cs
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()
{
    GlowEffect = new Glow()
    {
        GlowColor = IronWord.Models.Color.Aqua,
        GlowRadius = 10,
    },
};

// Add text with style
doc.AddText("Hello World").Style = textStyle;

// Export new Word document
doc.SaveAs("glowEffect.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 {
	.GlowEffect = New Glow() With {
		.GlowColor = IronWord.Models.Color.Aqua,
		.GlowRadius = 10
	}
}

' Add text with style
doc.AddText("Hello World").Style = textStyle

' Export new Word document
doc.SaveAs("glowEffect.docx")
VB   C#
グロー効果を加える

グロー効果の特性

以下は、すべてのグロー効果のプロパティとその説明です:

  • GlowRadius :グロー効果の半径を取得または設定します。 グロー半径はポイントで指定する (1/72インチ).
  • GlowColor :グロー効果の色を取得または設定します。

グロー・エフェクトの例

グロー・エフェクトの例をもう少し見てみよう。 グロー・エフェクトの色はARGB値にも対応しています。 最初の値はアルファ値で、色の不透明度を表す。

グロー効果の例