function calculateFillImageDimensionOutsideCanvas({
  shapeObj,
  left,
  top,
  width,
  height,
  cropX,
  cropY,
  flipX,
  flipY,
  right,
  bottom,
}) {
  const overflowAreaPositionFixer = (type, outDistance, imageLeft, imageTop) =>
    calculateDistanceOverflowPart({
      type,
      outDistance,
      shapeObj,
      flipX,
      flipY,
      left: imageLeft,
      top: imageTop,
    });
  const [originalWidth, originalHeight] = [width, height];

  [left, top, width, height] = calculateDimensionLeftTopEdge(overflowAreaPositionFixer, {
    left,
    top,
    width,
    height,
    cropX,
    cropY,
  });

  [left, top, width, height] = calculateDimensionRightBottomEdge(overflowAreaPositionFixer, {
    left,
    top,
    insideCanvasRealImageWidth: width,
    insideCanvasRealImageHeight: height,
    right,
    bottom,
    cropX,
    cropY,
    originalWidth,
    originalHeight,
  });

  return [left, top, width, height];
}
Calculate fill image position and size for out of Canvas
@param {Object} options - options for position dimension calculate
  @param {fabric.Object} shapeObj - shape object
  @param {number} left - original left position
  @param {number} top - original top position
  @param {number} width - image width
  @param {number} height - image height
  @param {number} cropX - image cropX
  @param {number} cropY - image cropY
  @param {boolean} flipX - shape flipX
  @param {boolean} flipY - shape flipY
@returns {Object}