ShapeLineStyle enumeration

ShapeLineStyle enumeration

Specifies the compound line style of a Shape.


SINGLESingle line.
DOUBLEDouble lines of equal width.
THICK_THINDouble lines, one thick, one thin.
THIN_THICKDouble lines, one thin, one thick.
TRIPLEThree lines, thin, thick, thin.
DEFAULTDefault value is ShapeLineStyle.SINGLE.


Shows how change stroke properties.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)

shape = builder.insert_shape(aw.drawing.ShapeType.RECTANGLE, aw.drawing.RelativeHorizontalPosition.LEFT_MARGIN, 100,
    aw.drawing.RelativeVerticalPosition.TOP_MARGIN, 100, 200, 200, aw.drawing.WrapType.NONE)

# Basic shapes, such as the rectangle, have two visible parts.
# 1 -  The fill, which applies to the area within the outline of the shape:
shape.fill.fore_color = drawing.Color.white

# 2 -  The stroke, which marks the outline of the shape:
# Modify various properties of this shape's stroke.
stroke = shape.stroke
stroke.on = True
stroke.weight = 5
stroke.color =
stroke.dash_style = aw.drawing.DashStyle.SHORT_DASH_DOT_DOT
stroke.join_style = aw.drawing.JoinStyle.MITER
stroke.end_cap = aw.drawing.EndCap.SQUARE
stroke.line_style = aw.drawing.ShapeLineStyle.TRIPLE

stroke.fill.two_color_gradient(,, awd.GradientStyle.VERTICAL, awd.GradientVariant.VARIANT1) + "Shape.stroke.docx")

See Also