Home/ Reference/ Fill

shape.Fill.Type

Fill type. 0 none / 1 uniform / 2 fountain / 3 PostScript / 8 texture / 9 pattern / 10 bitmap pattern. Test this to find out whether a shape is filled at all.Note th

Signature

shape.Fill.Type

Notes

Fill type. 0 none / 1 uniform / 2 fountain / 3 PostScript / 8 texture / 9 pattern / 10 bitmap pattern. Test this to find out whether a shape is filled at all.Note that 5, 6 and 7 are gaps — the numbering is not contiguous.

Python example (runnable)

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

t = shape.Fill.Type
if t == 0:
    print("no fill")
elif t == 1:
    print("uniform fill, colour: ", shape.Fill.UniformColor.HexValue)
else:
    print("other fill type: ", t)

About this section: Fill

Fill — uniform, gradient and pattern fills.

Other entries in this section