GlowFormat

GlowFormat class

Represents the glow formatting for an object.

public class GlowFormat

Properties

NameDescription
Color { get; set; }Gets or sets a Color object that represents the color for a glow effect. The default value is Black.
Radius { get; set; }Gets or sets a double value that represents the length of the radius for a glow effect in points (pt). The default value is 0.0.
Transparency { get; set; }Gets or sets the degree of transparency for the glow effect as a value between 0.0 (opaque) and 1.0 (clear). The default value is 0.0.

Methods

NameDescription
Remove()Removes GlowFormat from the parent object.

Remarks

Use the Glow property to access glow properties of an object. You do not create instances of the GlowFormat class directly.

Examples

Shows how to interact with glow shape effect.

Document doc = new Document(MyDir + "Various shapes.docx");
Shape shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);

shape.Glow.Color = Color.Salmon;
shape.Glow.Radius = 30;
shape.Glow.Transparency = 0.15;

doc.Save(ArtifactsDir + "Shape.Glow.docx");

doc = new Document(ArtifactsDir + "Shape.Glow.docx");
shape = (Shape)doc.GetChild(NodeType.Shape, 0, true);

Assert.AreEqual(Color.FromArgb(217, 250, 128, 114).ToArgb(), shape.Glow.Color.ToArgb());
Assert.AreEqual(30, shape.Glow.Radius);
Assert.AreEqual(0.15d, shape.Glow.Transparency, 0.01d);

shape.Glow.Remove();

Assert.AreEqual(Color.Black.ToArgb(), shape.Glow.Color.ToArgb());
Assert.AreEqual(0, shape.Glow.Radius);
Assert.AreEqual(0, shape.Glow.Transparency);

See Also