recalcRotatedPath = () => {
  const currentPath = path.elem
  angle = getRotationAngle(currentPath, true)
  if (!angle) { return }
  // selectedBBoxes[0] = path.oldbbox;
  const oldbox = path.oldbbox // selectedBBoxes[0],
  oldcx = oldbox.x + oldbox.width / 2
  oldcy = oldbox.y + oldbox.height / 2
  const box = getBBox(currentPath)
  newcx = box.x + box.width / 2
  newcy = box.y + box.height / 2

  // un-rotate the new center to the proper position
  const dx = newcx - oldcx
  const dy = newcy - oldcy
  const r = Math.sqrt(dx * dx + dy * dy)
  const theta = Math.atan2(dy, dx) + angle

  newcx = r * Math.cos(theta) + oldcx
  newcy = r * Math.sin(theta) + oldcy

  const list = currentPath.pathSegList

  let i = list.numberOfItems
  while (i) {
    i -= 1
    const seg = list.getItem(i)
    const type = seg.pathSegType
    if (type === 1) { continue }

    const rvals = getRotVals(seg.x, seg.y)
    const points = [rvals.x, rvals.y]
    if (seg.x1 && seg.x2) {
      const cVals1 = getRotVals(seg.x1, seg.y1)
      const cVals2 = getRotVals(seg.x2, seg.y2)
      points.splice(points.length, 0, cVals1.x, cVals1.y, cVals2.x, cVals2.y)
    }
    replacePathSeg(type, i, points)
  } // loop for each point

  /* box = */ getBBox(currentPath)
  // selectedBBoxes[0].x = box.x; selectedBBoxes[0].y = box.y;
  // selectedBBoxes[0].width = box.width; selectedBBoxes[0].height = box.height;

  // now we must set the new transform to be rotated around the new center
  const Rnc = svgCanvas.getSvgRoot().createSVGTransform()
  const tlist = getTransformList(currentPath)
  Rnc.setRotate((angle * 180.0 / Math.PI), newcx, newcy)
  tlist.replaceItem(Rnc, 0)
}
@function module:path.recalcRotatedPath
@todo This is still using ye olde transform methods, can probably
be optimized or even taken care of by `recalculateDimensions`
@returns {void}