In China, Japan, India, Pakistan, Nigeria, Gambia, and other parts of West Africa and southeast Asia, patterned silk and cotton fabrics were produced using resist dyeing techniques in which the cloth is printed or stenciled with starch or wax, or tied in various ways to prevent even penetration of the dye when the cloth is piece-dyed.