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 & InitPython
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.
- This section has 8 entries; this is one of them.
- See the full section index: Fountain Fill
Other entries in this section
- shape.Fill.ApplyFountainFill(StartColor, EndColor, Type, Angle, Steps, EdgePad, MidPoint)Lays down a gradient in one call. The argument order is fixed: start c
- ff.TypeGradient shape, and it is writable: 1 linear / 2 radial / 3 conical /
- ff.AngleRead-only. The angle is a parameter of ApplyFountainFill() and nothing
- ff.MidPointWhere the two stops meet, as a percentage. Lower it (25) and the start
- ff.Colors.Add(Position, Color)Inserts an intermediate stop, for three-color and rainbow gradients. P
- ff.StartColor / ff.EndColorThe two end colors on a FountainFill. Reading them is fine; to change
- ff.StepsNumber of steps. 0 means a smooth blend; 5-10 gives banded color rings