VegaRise.NET
HomeAPI Reference
Back to DOM

ShadingPatternValuesEnum

Definition

Namespace
DOM.Enums
Assembly
DOM.dll

Specifies the preset pattern used for a shading (background) fill.

Remarks

The pattern values defined here correspond to the drawing-ML preset patterns and can be applied to a instance to render striped, cross-hatched, checkered, or percentage-based backgrounds behind text, paragraphs, table cells, or shapes. Shading Percentage-based patterns ( … ) map two colors onto a bitmap mask, where the numerical value represents the approximate coverage of the pattern color. Pct5 Pct95

Examples

csharp
1// 1. Solid shading
2var shading = new Shading { ShadingPatternValue = ShadingPatternValues.Solid, BackgroundColor = new Color("#F5F5F5") };
3
csharp
1// 2. Horizontal stripes
2var shading = new Shading
3{
4 ShadingPatternValue = ShadingPatternValues.HorzStripe,
5 BackgroundColor = Color.White,
6 PatternColor = Color.LightGray
7};
8
csharp
1// 3. 10% coverage pattern
2var shading = new Shading
3{
4 ShadingPatternValue = ShadingPatternValues.Pct10,
5 BackgroundColor = Color.White,
6 PatternColor = Color.DarkBlue
7};
8
csharp
1// 4. Diagonal cross-hatch
2var shading = new Shading
3{
4 ShadingPatternValue = ShadingPatternValues.DiagCross,
5 BackgroundColor = Color.White,
6 PatternColor = Color.Gray
7};
8

Fields

Clear

Clear pattern — no fill.

DiagCross

Diagonal cross-hatch.

DiagStripe

Forward diagonal stripes.

HorzCross

Horizontal cross-hatch.

HorzStripe

Horizontal stripes.

Nil

No pattern (nil value, no shading rendered).

Pct10

Approximately 10% pattern coverage.

Pct12

Approximately 12% pattern coverage.

Pct15

Approximately 15% pattern coverage.

Pct20

Approximately 20% pattern coverage.

Pct25

Approximately 25% pattern coverage.

Pct30

Approximately 30% pattern coverage.

Pct35

Approximately 35% pattern coverage.

Pct37

Approximately 37% pattern coverage.

Pct40

Approximately 40% pattern coverage.

Pct45

Approximately 45% pattern coverage.

Pct5

Approximately 5% pattern coverage.

Pct50

Approximately 50% pattern coverage.

Pct55

Approximately 55% pattern coverage.

Pct60

Approximately 60% pattern coverage.

Pct62

Approximately 62% pattern coverage.

Pct65

Approximately 65% pattern coverage.

Pct70

Approximately 70% pattern coverage.

Pct75

Approximately 75% pattern coverage.

Pct80

Approximately 80% pattern coverage.

Pct85

Approximately 85% pattern coverage.

Pct87

Approximately 87% pattern coverage.

Pct90

Approximately 90% pattern coverage.

Pct95

Approximately 95% pattern coverage.

ReverseDiagStripe

Reverse diagonal stripes.

Solid

Solid single-color fill.

ThinDiagCross

Thin diagonal cross-hatch.

ThinDiagStripe

Thin forward diagonal stripes.

ThinHorzCross

Thin horizontal cross-hatch.

ThinHorzStripe

Thin horizontal stripes.

ThinReverseDiagStripe

Thin reverse diagonal stripes.

ThinVertStripe

Thin vertical stripes.

VertStripe

Vertical stripes.