function getCachedCanvasImageElement(canvasImage, reset = false) {
  if (!cachedCanvasImageElement || reset) {
    cachedCanvasImageElement = canvasImage.toCanvasElement();
  }

  return cachedCanvasImageElement;
}
Calculate a point line outside the canvas.
@param {fabric.Image} canvasImage - canvas background image
@param {boolean} reset - default is false
@returns {HTMLImageElement}