SoftEdgeFormat class

SoftEdgeFormat class

Represents the soft edge formatting for an object.

Remarks

Use the ShapeBase.soft_edge property to access soft edge properties of an object. You do not create instances of the SoftEdgeFormat class directly.

Properties

NameDescription
radiusGets or sets a double value that represents the length of the radius for a soft edge effect in points (pt). The default value is 0.0.

Methods

NameDescription
remove()Removes SoftEdgeFormat from the parent object.

Examples

Shows how to work with soft edge formatting.

builder = aw.DocumentBuilder()
shape = builder.insert_shape(shape_type=aw.drawing.ShapeType.RECTANGLE, width=200, height=200)
# Apply soft edge to the shape.
shape.soft_edge.radius = 30
builder.document.save(file_name=ARTIFACTS_DIR + 'Shape.SoftEdge.docx')
# Load document with rectangle shape with soft edge.
doc = aw.Document(file_name=ARTIFACTS_DIR + 'Shape.SoftEdge.docx')
shape = doc.get_child(aw.NodeType.SHAPE, 0, True).as_shape()
soft_edge_format = shape.soft_edge
# Check soft edge radius.
self.assertEqual(30, soft_edge_format.radius)
# Remove soft edge from the shape.
soft_edge_format.remove()
# Check radius of the removed soft edge.
self.assertEqual(0, soft_edge_format.radius)

See Also