VegaRise.NET
HomeAPI Reference
Back to DOM

BaseFillClass

Definition

Namespace
DOM.Abstracts
Assembly
DOM.dll

Base class for fill definitions used by graphical elements.

Remarks

is the abstract root of the fill hierarchy. It exists so that fills can be stored in generic collections (for example ) and share the graphical-element base type. BaseFill FormatScheme.FillStyleList Concrete fill types include (solid),,, and . The top-level container aggregates these and is assigned to shapes and other fillable elements. Color Gradient PatternFill PictureOrTextureFill Fill

Examples

csharp
1// 1. Store different fill types in a single list
2var fills = new List<BaseFill>
3{
4 new Color("#2196F3"),
5 new Gradient { /* ... */ }
6};
7
csharp
1// 2. Use a fill as a scheme fill style
2var scheme = new FormatScheme
3{
4 FillStyleList = new List<BaseFill> { new Color("#FF9800") }
5};
6
csharp
1// 3. Cast a concrete fill back to BaseFill
2BaseFill fill = new DuoTone();
3
csharp
1// 4. Attach a concrete fill to a shape
2var shape = new Shape { Fill = new Fill { SolidFill = new Color("#4CAF50") } };
3
No members discovered for this type.