PatternType enumeration
PatternType enumeration
Specifies the fill pattern to be used to fill a shape.
Members
| Name | Description |
|---|---|
| None | No pattern. |
| Percent10 | 10% of the foreground color. |
| Percent20 | 20% of the foreground color. |
| Percent25 | 25% of the foreground color. |
| Percent30 | 30% of the foreground color. |
| Percent40 | 40% of the foreground color |
| Percent50 | 50% of the foreground color |
| Percent5 | 5% of the foreground color. |
| Percent60 | 60% of the foreground color. |
| Percent70 | 70% of the foreground color. |
| Percent75 | 75% of the foreground color. |
| Percent80 | 80% of the foreground color. |
| Percent90 | 90% of the foreground color. |
| Cross | Cross. |
| DarkDownwardDiagonal | Dark downward diagonal. |
| DarkHorizontal | Dark horizontal. |
| DarkUpwardDiagonal | Dark upward diagonal. |
| DarkVertical | Dark vertical. |
| DashedDownwardDiagonal | Dashed downward diagonal. |
| DashedHorizontal | Dashed horizontal. |
| DashedUpwardDiagonal | Dashed upward diagonal. |
| DashedVertical | Dashed vertical. |
| DiagonalBrick | Diagonal brick. |
| DiagonalCross | Diagonal cross. |
| Divot | Pattern divot. |
| DottedDiamond | Dotted diamond. |
| DottedGrid | Dotted grid. |
| DownwardDiagonal | Downward diagonal. |
| Horizontal | Horizontal. |
| HorizontalBrick | Horizontal brick. |
| LargeCheckerBoard | Large checker board. |
| LargeConfetti | Large confetti. |
| LargeGrid | Large grid. |
| LightDownwardDiagonal | Light downward diagonal. |
| LightHorizontal | Light horizontal. |
| LightUpwardDiagonal | Light upward diagonal. |
| LightVertical | Light vertical. |
| NarrowHorizontal | Narrow horizontal. |
| NarrowVertical | Narrow vertical. |
| OutlinedDiamond | Outlined diamond. |
| Plaid | Plaid. |
| Shingle | Shingle. |
| SmallCheckerBoard | Small checker board. |
| SmallConfetti | Small confetti. |
| SmallGrid | Small grid. |
| SolidDiamond | Solid diamond. |
| Sphere | Sphere. |
| Trellis | Trellis. |
| UpwardDiagonal | Upward diagonal. |
| Vertical | Vertical. |
| Wave | Wave. |
| Weave | Weave. |
| WideDownwardDiagonal | Wide downward diagonal. |
| WideUpwardDiagonal | Wide upward diagonal. |
| ZigZag | Zig zag. |
Examples
Shows how to set pattern for a shape.
let doc = new aw.Document(base.myDir + "Shape stroke pattern border.docx");
let shape = doc.getShape(0, true);
let fill = shape.fill;
console.log(`Pattern value is: ${fill.pattern}`);
// There are several ways specified fill to a pattern.
// 1 - Apply pattern to the shape fill:
fill.patterned(aw.Drawing.PatternType.DiagonalBrick);
// 2 - Apply pattern with foreground and background colors to the shape fill:
fill.patterned(aw.Drawing.PatternType.DiagonalBrick, "#00FFFF", "#FFE4C4");
doc.save(base.artifactsDir + "Shape.FillPattern.docx");
See Also
- module Aspose.Words.Drawing