Home/ Reference/ Pattern / Texture Fill

shape.Fill.GetCopy() / fill.CompareWith(fill2)

Takes a copy of a fill (leaving the original alone), or compares two fills. Useful for batch-checking whether anything drifted.

Signature

shape.Fill.GetCopy() / fill.CompareWith(fill2)

Notes

Takes a copy of a fill (leaving the original alone), or compares two fills. Useful for batch-checking whether anything drifted.

Python example (runnable)

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

for i in range(2, shapes.Count + 1):
    f2 = shapes.Item(i).Fill
    same = f1.CompareWith(f2)                       # True/False
    print("#", i, " matches the first fill: ", same)

About this section: Pattern / Texture Fill

Pattern / Texture Fill — pattern, texture and PostScript fills.

Other entries in this section