VegaRise.NET

Text Effects

TextEffect aggregates the visual effects that can be applied to a text run: outline, glow, reflection, 3D, gradient fill, and solid fill.

Outline + Glow

Use case: Create a bold outlined title with a soft glow.

C#
1var effect = new TextEffect
2{
3 TextOutlineEffect = new TextOutlineEffect
4 {
5 LineWidth = 2.0,
6 Color = Color.Black,
7 LineCapType = LineCapValues.Round,
8 CompoundLineType = CompoundLineValues.Single,
9 },
10GlowEffect = new Glow
11{
12 GlowRadius = 6.0,
13 GlowColor = Color.Gold,
14},
15};

Reflection Below Text

Use case: Add a soft mirrored reflection to a title.

C#
1var effect = new TextEffect
2{
3 ReflectionEffect = new Reflection
4 {
5 Alignment = RectangleAlignmentValues.BottomCenter,
6 BlurRadius = 5.0,
7 StartingOpacity = 70,
8 EndingOpacity = 20,
9 DistanceFromText = 4.0,
10 }
11};

3D Text

Use case: Give a heading an extruded, metallic look.

C#
1var effect = new TextEffect
2{
3 Effect3D = new Effect3D
4 {
5 ExtrusionHeight = 12.0,
6 ContourWidth = 2.0,
7 PresetMaterialType = PresetMaterialTypeValues.Metal,
8 ExtrusionColor = Color.Silver,
9 ContourColor = Color.Black,
10 }
11};

Solid Fill via TextEffect

Use case: Apply a solid fill color from within the effect pipeline.

C#
1var effect = new TextEffect
2{
3 SolidFill = Color.DarkBlue,
4 // When GradientFill is null, SolidFill is used.
5};

Frequently asked questions

Are the individual effects independent?

Yes. You can enable any subset of TextOutlineEffect, GlowEffect, ReflectionEffect, Effect3D, and a fill.

What happens if both GradientFill and SolidFill are set?

Typically the gradient takes precedence. Remove GradientFill if you want the solid fill to apply.

VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.