Home/ Reference/ Layer & Shapes

layer.CreateEllipse2(x, y, w, h)

Ellipse from bottom-left corner plus size. w == h gives a circle.

Signature

layer.CreateEllipse2(x, y, w, h)

Notes

Ellipse from bottom-left corner plus size. w == h gives a circle.

Python example (runnable)

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

# CreateEllipse2(x, y, width, height): bottom-left plus size
oval = layer.CreateEllipse2(50/25.4, 50/25.4, 30/25.4, 30/25.4)

oval.Fill.UniformColor.RGBAssign(230, 60, 60)   # fill red
oval.Outline.Width = 0                          # no outline

print("Red circle drawn")

About this section: Layer & Shapes

Layer & Shapes — layers and shape creation.

Other entries in this section