Defines a fill for a shape.
For a list of all members of this type, see Fill Members.
System.Object
Aspose.Words.Drawing.Fill
[Visual Basic]
Public Class Fill
Remarks
Use the Fill property to access fill properties of a shape. You do not create instances of the Fill class directly.
Although the Fill class provides properties to specify solid color fill only, all of the more complex fill types, including as gradient, pattern and texture are fully preserved during document open-save cycles.
Example
Demonstrates how to create shapes with fill.
[C#]
DocumentBuilder builder = new DocumentBuilder();
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;
builder.InsertNode(shape);
builder.Document.Save(MyDir + "Shape.Fill Out.doc");[Visual Basic]
Dim builder As DocumentBuilder = New DocumentBuilder()
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.
Dim shape As Shape = New Shape(builder.Document, ShapeType.Balloon)
shape.FillColor = Color.Red
shape.Fill.Opacity = 0.3
builder.InsertNode(shape)
builder.Document.Save(MyDir & "Shape.Fill Out.doc")Requirements
Namespace: Aspose.Words.Drawing
Assembly: Aspose.Words (in Aspose.Words.dll)
See Also
Fill Members | Aspose.Words.Drawing Namespace | Fill