Added methods to canvas-helper.js