VegaRise.NET
HomeAPI Reference
Back to DOM

TextEffectClass

Definition

Namespace
DOM.Elements.Graphics.Effects
Assembly
DOM.dll

Represents the text effects applied to an object or text, such as shadow, outline, glow, reflection, 3D effect, or gradient.

Remarks

is a composition container for the visual effects that can be applied to a text run. Each property is optional and independent, so callers can combine any subset of outline, glow, reflection, 3D, gradient, and solid fill. TextEffect Text effects are assigned via . TextStyle.TextEffect

Examples

csharp
1// 1. Simple outline
2var effect = new TextEffect
3{
4 TextOutlineEffect = new TextOutlineEffect
5 {
6 LineWidth = new DocumentUnit(2, Units.pt),
7 Color = Color.Black
8 }
9};
10
csharp
1// 2. Outline + glow
2var effect = new TextEffect
3{
4 TextOutlineEffect = new TextOutlineEffect { LineWidth = new DocumentUnit(2, Units.pt), Color = Color.Black },
5 GlowEffect = new Glow { GlowRadius = new DocumentUnit(6, Units.pt), GlowColor = Color.Gold }
6};
7
csharp
1// 3. Reflection below the text
2var effect = new TextEffect
3{
4 ReflectionEffect = new Reflection
5 {
6 Alignment = RectangleAlignmentValues.BottomCenter,
7 BlurRadius = new DocumentUnit(5, Units.pt),
8 StartingOpacity = 70,
9 EndingOpacity = 20
10 }
11};
12
csharp
1// 4. 3D extruded text
2var effect = new TextEffect
3{
4 Effect3D = new Effect3D
5 {
6 ExtrusionHeight = new DocumentUnit(8, Units.pt),
7 PresetMaterialType = PresetMaterialTypeValues.Metal
8 }
9};
10
csharp
1// 5. Gradient fill for a gradient title
2var effect = new TextEffect
3{
4 GradientFill = new Gradient
5 {
6 GradientStops = new List<IGradientStop>
7 {
8 new GradientStop { StopColor = Color.Red, StopPosition = 0 },
9 new GradientStop { StopColor = Color.Yellow, StopPosition = 100 }
10 },
11 LinearShade = new LinearShade { Angle = 90 }
12 }
13};
14
csharp
1// 6. Solid fill only
2var effect = new TextEffect { SolidFill = Color.DarkBlue };
3

Properties

Effect3D

Gets or sets the 3D effect applied to the text.

GlowEffectGlow

Gets or sets the glow effect applied to the text.

GradientFillGradient

Gets or sets the gradient fill applied to the text.

ReflectionEffectReflection

Gets or sets the reflection effect applied to the text.

SolidFillColor

Gets or sets the solid fill color applied to the text.

TextOutlineEffect

Gets or sets the text outline effect applied to the text.