Must have mixed tabs and spaces in that last post. Try this: def block_text(canvas,text,posx,posy,sizex,sizey): canvas.saveState() p = canvas.beginPath() p.rect(posx,posy,sizex,sizey) canvas.clipPath(p,stroke=0) canvas.drawString(posx,posy,text) canvas.restoreState() -- pkm ~ http://paulmcnett.com