PatternType enumeration

PatternType enumeration

Specifies the fill pattern to be used to fill a shape.

Members

NameDescription
NONENo pattern.
PERCENT1010% of the foreground color.
PERCENT2020% of the foreground color.
PERCENT2525% of the foreground color.
PERCENT3030% of the foreground color.
PERCENT4040% of the foreground color
PERCENT5050% of the foreground color
PERCENT55% of the foreground color.
PERCENT6060% of the foreground color.
PERCENT7070% of the foreground color.
PERCENT7575% of the foreground color.
PERCENT8080% of the foreground color.
PERCENT9090% of the foreground color.
CROSSCross.
DARK_DOWNWARD_DIAGONALDark downward diagonal.
DARK_HORIZONTALDark horizontal.
DARK_UPWARD_DIAGONALDark upward diagonal.
DARK_VERTICALDark vertical.
DASHED_DOWNWARD_DIAGONALDashed downward diagonal.
DASHED_HORIZONTALDashed horizontal.
DASHED_UPWARD_DIAGONALDashed upward diagonal.
DASHED_VERTICALDashed vertical.
DIAGONAL_BRICKDiagonal brick.
DIAGONAL_CROSSDiagonal cross.
DIVOTPattern divot.
DOTTED_DIAMONDDotted diamond.
DOTTED_GRIDDotted grid.
DOWNWARD_DIAGONALDownward diagonal.
HORIZONTALHorizontal.
HORIZONTAL_BRICKHorizontal brick.
LARGE_CHECKER_BOARDLarge checker board.
LARGE_CONFETTILarge confetti.
LARGE_GRIDLarge grid.
LIGHT_DOWNWARD_DIAGONALLight downward diagonal.
LIGHT_HORIZONTALLight horizontal.
LIGHT_UPWARD_DIAGONALLight upward diagonal.
LIGHT_VERTICALLight vertical.
NARROW_HORIZONTALNarrow horizontal.
NARROW_VERTICALNarrow vertical.
OUTLINED_DIAMONDOutlined diamond.
PLAIDPlaid.
SHINGLEShingle.
SMALL_CHECKER_BOARDSmall checker board.
SMALL_CONFETTISmall confetti.
SMALL_GRIDSmall grid.
SOLID_DIAMONDSolid diamond.
SPHERESphere.
TRELLISTrellis.
UPWARD_DIAGONALUpward diagonal.
VERTICALVertical.
WAVEWave.
WEAVEWeave.
WIDE_DOWNWARD_DIAGONALWide downward diagonal.
WIDE_UPWARD_DIAGONALWide upward diagonal.
ZIG_ZAGZig zag.

Examples

Shows how to set pattern for a shape.

doc = aw.Document(file_name=MY_DIR + 'Shape stroke pattern border.docx')
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
fill = shape.fill
print('Pattern value is: {0}'.format(fill.pattern))
# There are several ways specified fill to a pattern.
# 1 -  Apply pattern to the shape fill:
fill.patterned(pattern_type=aw.drawing.PatternType.DIAGONAL_BRICK)
# 2 -  Apply pattern with foreground and background colors to the shape fill:
fill.patterned(pattern_type=aw.drawing.PatternType.DIAGONAL_BRICK, fore_color=aspose.pydrawing.Color.aqua, back_color=aspose.pydrawing.Color.bisque)
doc.save(file_name=ARTIFACTS_DIR + 'Shape.FillPattern.docx')

See Also