code: function setCanvasSize (width, height) {
              canvas.setAttribute('width', width);
              canvas.setAttribute('height', height);
              canvas.style.width = width + 'px';
              canvas.style.height = height + 'px';
          }
docs: Set the size of canvas