java.lang.Object
com.aspose.words.PatternType
public class PatternType
- extends java.lang.Object
Utility class containing constants.
Specifies the fill pattern to be used to fill a shape.
Example:
Shows how to set pattern for a shape.
Document doc = new Document(getMyDir() + "Shape stroke pattern border.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
Fill fill = shape.getFill();
System.out.println(MessageFormat.format("Pattern value is: {0}",fill.getPattern()));
// There are several ways specified fill to a pattern.
// 1 - Apply pattern to the shape fill:
fill.patterned(PatternType.DIAGONAL_BRICK);
// 2 - Apply pattern with foreground and background colors to the shape fill:
fill.patterned(PatternType.DIAGONAL_BRICK, Color.yellow, Color.blue);
doc.save(getArtifactsDir() + "Shape.FillPattern.docx");
NONE = -1 | |
public static final int NONE |
-
No pattern.
PERCENT_10 = 1 | |
public static final int PERCENT_10 |
-
10% of the foreground color.
PERCENT_20 = 2 | |
public static final int PERCENT_20 |
-
20% of the foreground color.
PERCENT_25 = 3 | |
public static final int PERCENT_25 |
-
25% of the foreground color.
PERCENT_30 = 4 | |
public static final int PERCENT_30 |
-
30% of the foreground color.
PERCENT_40 = 5 | |
public static final int PERCENT_40 |
-
40% of the foreground color
PERCENT_50 = 6 | |
public static final int PERCENT_50 |
-
50% of the foreground color
PERCENT_5 = 7 | |
public static final int PERCENT_5 |
-
5% of the foreground color.
PERCENT_60 = 8 | |
public static final int PERCENT_60 |
-
60% of the foreground color.
PERCENT_70 = 9 | |
public static final int PERCENT_70 |
-
70% of the foreground color.
PERCENT_75 = 10 | |
public static final int PERCENT_75 |
-
75% of the foreground color.
PERCENT_80 = 11 | |
public static final int PERCENT_80 |
-
80% of the foreground color.
PERCENT_90 = 12 | |
public static final int PERCENT_90 |
-
90% of the foreground color.
CROSS = 13 | |
public static final int CROSS |
-
Cross.
DARK_DOWNWARD_DIAGONAL = 14 | |
public static final int DARK_DOWNWARD_DIAGONAL |
-
Dark downward diagonal.
DARK_HORIZONTAL = 15 | |
public static final int DARK_HORIZONTAL |
-
Dark horizontal.
DARK_UPWARD_DIAGONAL = 16 | |
public static final int DARK_UPWARD_DIAGONAL |
-
Dark upward diagonal.
DARK_VERTICAL = 17 | |
public static final int DARK_VERTICAL |
-
Dark vertical.
DASHED_DOWNWARD_DIAGONAL = 18 | |
public static final int DASHED_DOWNWARD_DIAGONAL |
-
Dashed downward diagonal.
DASHED_HORIZONTAL = 19 | |
public static final int DASHED_HORIZONTAL |
-
Dashed horizontal.
DASHED_UPWARD_DIAGONAL = 20 | |
public static final int DASHED_UPWARD_DIAGONAL |
-
Dashed upward diagonal.
DASHED_VERTICAL = 21 | |
public static final int DASHED_VERTICAL |
-
Dashed vertical.
DIAGONAL_BRICK = 22 | |
public static final int DIAGONAL_BRICK |
-
Diagonal brick.
DIAGONAL_CROSS = 23 | |
public static final int DIAGONAL_CROSS |
-
Diagonal cross.
DIVOT = 24 | |
public static final int DIVOT |
-
Pattern divot.
DOTTED_DIAMOND = 25 | |
public static final int DOTTED_DIAMOND |
-
Dotted diamond.
DOTTED_GRID = 26 | |
public static final int DOTTED_GRID |
-
Dotted grid.
DOWNWARD_DIAGONAL = 27 | |
public static final int DOWNWARD_DIAGONAL |
-
Downward diagonal.
HORIZONTAL = 28 | |
public static final int HORIZONTAL |
-
Horizontal.
HORIZONTAL_BRICK = 29 | |
public static final int HORIZONTAL_BRICK |
-
Horizontal brick.
LARGE_CHECKER_BOARD = 30 | |
public static final int LARGE_CHECKER_BOARD |
-
Large checker board.
LARGE_CONFETTI = 31 | |
public static final int LARGE_CONFETTI |
-
Large confetti.
LARGE_GRID = 32 | |
public static final int LARGE_GRID |
-
Large grid.
LIGHT_DOWNWARD_DIAGONAL = 33 | |
public static final int LIGHT_DOWNWARD_DIAGONAL |
-
Light downward diagonal.
LIGHT_HORIZONTAL = 34 | |
public static final int LIGHT_HORIZONTAL |
-
Light horizontal.
LIGHT_UPWARD_DIAGONAL = 36 | |
public static final int LIGHT_UPWARD_DIAGONAL |
-
Light upward diagonal.
LIGHT_VERTICAL = 37 | |
public static final int LIGHT_VERTICAL |
-
Light vertical.
NARROW_HORIZONTAL = 38 | |
public static final int NARROW_HORIZONTAL |
-
Narrow horizontal.
NARROW_VERTICAL = 39 | |
public static final int NARROW_VERTICAL |
-
Narrow vertical.
OUTLINED_DIAMOND = 40 | |
public static final int OUTLINED_DIAMOND |
-
Outlined diamond.
PLAID = 41 | |
public static final int PLAID |
-
Plaid.
SHINGLE = 42 | |
public static final int SHINGLE |
-
Shingle.
SMALL_CHECKER_BOARD = 43 | |
public static final int SMALL_CHECKER_BOARD |
-
Small checker board.
SMALL_CONFETTI = 44 | |
public static final int SMALL_CONFETTI |
-
Small confetti.
SMALL_GRID = 45 | |
public static final int SMALL_GRID |
-
Small grid.
SOLID_DIAMOND = 46 | |
public static final int SOLID_DIAMOND |
-
Solid diamond.
SPHERE = 47 | |
public static final int SPHERE |
-
Sphere.
TRELLIS = 48 | |
public static final int TRELLIS |
-
Trellis.
UPWARD_DIAGONAL = 49 | |
public static final int UPWARD_DIAGONAL |
-
Upward diagonal.
VERTICAL = 50 | |
public static final int VERTICAL |
-
Vertical.
WAVE = 51 | |
public static final int WAVE |
-
Wave.
WEAVE = 52 | |
public static final int WEAVE |
-
Weave.
WIDE_DOWNWARD_DIAGONAL = 53 | |
public static final int WIDE_DOWNWARD_DIAGONAL |
-
Wide downward diagonal.
WIDE_UPWARD_DIAGONAL = 54 | |
public static final int WIDE_UPWARD_DIAGONAL |
-
Wide upward diagonal.
ZIG_ZAG = 55 | |
public static final int ZIG_ZAG |
-
Zig zag.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.