added setExtent method to Canvas