Home/ Reference/ Fill

shape.Fill.ApplyFountainFill(...)

Gradient fill: start color, end color, type, angle, edge pad, midpoint.

Signature

shape.Fill.ApplyFountainFill(...)

Notes

Gradient fill: start color, end color, type, angle, edge pad, midpoint.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shape = app.ActiveSelectionRange(1)

# fountain fill: type / angle / start colour / end colour / edge pad / midpoint
# argument order shifts between versions; on error build colours with CreateRGBColor
try:
    c1 = app.CreateRGBColor(255, 255, 255)
    c2 = app.CreateRGBColor(0, 133, 205)
    shape.Fill.ApplyFountainFill(0, 90, c1, c2, 0, 50)
    print("Fountain fill applied")
except Exception as e:
    print("ApplyFountainFill argument mismatch: ", e)

About this section: Fill

Fill — uniform, gradient and pattern fills.

Other entries in this section