FillOpacity Property

Defines the transparency of a fill. Valid range from 0 to 1, where 0 is fully transparent and 1 is fully opaque.

Namespace:  Aspose.Words.Drawing
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public double Opacity { get; set; }

Property Value

Type: Double
Remarks

The default value is 1.

Examples
Demonstrates how to create shapes with fill.
DocumentBuilder builder = new DocumentBuilder();

builder.Writeln();
builder.Writeln();
builder.Writeln();
builder.Write("Some text under the shape.");

// Create a red balloon, semitransparent
// The shape is floating and its coordinates are (0,0) by default, relative to the current paragraph
Shape shape = new Shape(builder.Document, ShapeType.Balloon);
shape.FillColor = Color.Red;
shape.Fill.Opacity = 0.3;
shape.Width = 100;
shape.Height = 100;
shape.Top = -100;
builder.InsertNode(shape);

builder.Document.Save(ArtifactsDir + "Shape.Fill.doc");
See Also