Home/ Reference/ Fountain Fill

shape.Fill.ApplyFountainFill(StartColor, EndColor, Type, Angle, Steps, EdgePad, MidPoint)

Lays down a gradient in one call. The argument order is fixed: start color, end color, gradient type, angle, steps, edge feather, midpoint percentage. Returns a Foun

Signature

shape.Fill.ApplyFountainFill(StartColor, EndColor, Type, Angle, Steps, EdgePad, MidPoint)

Notes

Lays down a gradient in one call. The argument order is fixed: start color, end color, gradient type, angle, steps, edge feather, midpoint percentage. Returns a FountainFill, and you tweak everything else through it.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
shape = app.ActiveSelectionRange(1)                 # select a shape on the canvas first

white = app.CreateRGBColor(255, 255, 255)           # start colour (a Color object, not a string)
blue  = app.CreateRGBColor(0, 133, 205)             # end colour

ff = shape.Fill.ApplyFountainFill(
    white,        # StartColor: the start colour
    blue,         # EndColor: the end colour
    1,            # Type   1=linear 2=radial 3=conical 4=square
    90,           # Angle, 90 runs top to bottom
    0,            # Steps, 0 means smooth
    0,            # EdgePad, 0 means no padding
    50            # MidPoint as a percentage, 50 is dead centre
)

print("Fill type: ", shape.Fill.Type)             # 2 = fountain fill
print("Colour stops: ", ff.Colors.Count)                 # at least two, one at each end

About this section: Fountain Fill

Fountain Fill — linear and radial gradient fills.

Other entries in this section