function getReversePositionForFlip({ outDistance, startPointIndex, flipX, flipY, reatAngles }) {
  const rotationChangePoint1 = outDistance * Math.cos((reatAngles[0] * Math.PI) / 180);
  const rotationChangePoint2 = outDistance * Math.cos((reatAngles[1] * Math.PI) / 180);
  const isForward = startPointIndex === 2 || startPointIndex === 3;
  const diffPosition = {
    top: isForward ? rotationChangePoint1 : rotationChangePoint2,
    left: isForward ? rotationChangePoint2 : rotationChangePoint1,
  };

  if (isReverseLeftPositionForFlip(startPointIndex, flipX, flipY)) {
    diffPosition.left = diffPosition.left * -1;
  }
  if (isReverseTopPositionForFlip(startPointIndex, flipX, flipY)) {
    diffPosition.top = diffPosition.top * -1;
  }

  return diffPosition;
}
Calculate fill image position for out of Canvas
@param {number} outDistance - distance away
@param {boolean} flipX - flip x statux
@param {boolean} flipY - flip y statux
@param {Array} reatAngles - Line angle of the rectangle vertex.
@returns {Object} diffPosition