[reportlab-users] hard text clipping

Paul McNett p at ulmcnett.com
Wed Feb 16 00:25:19 EST 2005


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


More information about the reportlab-users mailing list