Home/ Reference/ Fountain Fill

shape.Fill.Fountain

Fetches the gradient sub-object. Requires Fill.Type == 2; otherwise it raises immediately — the first trap most people hit.

Signature

shape.Fill.Fountain

Notes

Fetches the gradient sub-object. Requires Fill.Type == 2; otherwise it raises immediately — the first trap most people hit.

Python example (runnable)

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

if shape.Fill.Type == 2:                            # only 2 means fountain fill
    ff = shape.Fill.Fountain                        # the FountainFill object
    print("Fountain type: ", ff.Type)                     # 1~4
    print("Fountain angle: ", ff.Angle)                    # read-only, see the next entry
else:
    print("Not a fountain fill, current type: ", shape.Fill.Type)

About this section: Fountain Fill

Fountain Fill — linear and radial gradient fills.

Other entries in this section