Merging saheb-canvas work from Saheb in GSOC2012 into trunk (from saheb-merge branch at changeset 4445). Some minor changes needed. -- jpye.