VegaRise.NET
HomeAPI Reference
Back to DOM

TextOutlineEffectClass

Definition

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

Represents the outline effect applied to text in a Word document.

Remarks

draws a stroke around each glyph of a text run. It combines the pen alignment, line cap, width, compound line style, line join, solid fill color, and preset line dash pattern that together define the outline. TextOutlineEffect A default preset is exposed via which configures a 0.5 pt orange solid outline with round line caps and a single compound line. DefaultEffect

Examples

csharp
1// 1. Use the default preset
2var outline = TextOutlineEffect.DefaultEffect;
3
csharp
1// 2. Custom black solid outline
2var outline = new TextOutlineEffect
3{
4 LineWidth = new DocumentUnit(2, Units.pt),
5 Color = Color.Black,
6 LineCapType = LineCapValues.Round,
7 CompoundLineType = CompoundLineValues.Single,
8 LineJoin = StrokeJoinStyleValues.Round,
9 presetLineDash = PresetLineDashValues.Solid
10};
11
csharp
1// 3. Dashed red outline
2var outline = new TextOutlineEffect
3{
4 LineWidth = new DocumentUnit(1.5, Units.pt),
5 Color = Color.Red,
6 presetLineDash = PresetLineDashValues.Dash
7};
8
csharp
1// 4. Inset double-line outline
2var outline = new TextOutlineEffect
3{
4 PenAlignment = PenAlignmentValues.Inset,
5 CompoundLineType = CompoundLineValues.Double,
6 LineWidth = new DocumentUnit(2, Units.pt),
7 Color = Color.DarkBlue
8};
9
csharp
1// 5. Attach to a TextEffect
2var effect = new TextEffect
3{
4 TextOutlineEffect = new TextOutlineEffect
5 {
6 LineWidth = new DocumentUnit(2, Units.pt),
7 Color = Color.White
8 }
9};
10

Constructors

TextOutlineEffect()

Creates an empty outline effect instance. All properties default to their type defaults and must be set explicitly by the caller.

Properties

Color

Gets or sets the solid fill color for the outline effect.

CompoundLineTypeCompoundLineValues

Gets or sets the type of compound line used for the outline effect.

LineCapTypeLineCapValues

Gets or sets the type of line cap used for the outline effect.

Gets or sets the stroke join style used for the outline effect.

LineWidthDocumentUnit

Gets or sets the width of the outline effect line.

The width is specified in points by convention, but any supported unit is accepted.

PenAlignmentPenAlignmentValues

Gets or sets the alignment of the pen used for the outline effect.

presetLineDashPresetLineDashValues

Gets or sets the preset line dash style for the outline effect.

Fields

DefaultEffect

A static, pre-configured outline effect instance suitable for typical use.

The default configures a 0.5 pt (6350 EMU) orange solid outline with round line caps, a single compound line, and the default pen alignment.