Home/ Reference/ Shape Appearance

shape.Rectangle

The rectangle sub-object, which owns the corners: .CornerType (0 = square) and .CornerRadius. in_rectangle.Rectangle.CornerType = 0 forces square corners.

Signature

shape.Rectangle

Notes

The rectangle sub-object, which owns the corners: .CornerType (0 = square) and .CornerRadius. in_rectangle.Rectangle.CornerType = 0 forces square corners.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
layer = doc.ActivePage.ActiveLayer

# Rectangle is the rectangle-only child object, it owns the corners
rect = layer.CreateRectangle2(0, 0, 80/25.4, 50/25.4)

rect.Rectangle.CornerType = 0              # 0 = square corners
print("Corner type: ", rect.Rectangle.CornerType)

# rect.Rectangle.CornerRadius = 5/25.4     # uncomment for rounded corners

About this section: Shape Appearance

Shape Appearance — outline, fill and transparency shortcuts.

Other entries in this section