Home/ Reference/ Pattern / Texture Fill

shape.Fill.ApplyTextureFill(TextureName, LibraryName)

Applies a texture by name. The second argument is the style library; leave it out and you get the main one. Hundreds of textures in there — the quickest way to get s

Signature

shape.Fill.ApplyTextureFill(TextureName, LibraryName)

Notes

Applies a texture by name. The second argument is the style library; leave it out and you get the main one. Hundreds of textures in there — the quickest way to get stone or wood onto a background.

Python example (runnable)

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

tf = shape.Fill.ApplyTextureFill("Blend Edges")     # texture name from the main library
print("Fill type: ", shape.Fill.Type)                  # 8 = texture fill

# library-qualified form; the library name must match your install
tf2 = shape.Fill.ApplyTextureFill("Alien Eyes", "Samples 9")
print("Switched to a texture from another library")

About this section: Pattern / Texture Fill

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

Other entries in this section