getControlPointsMethod = function (seg) {
  const { item, index } = seg
  if (!('x1' in item) || !('x2' in item)) { return null }
  const cpt = {}
  /* const pointGripContainer = */ getGripContainerMethod()

  // Note that this is intentionally not seg.prev.item
  const path = svgCanvas.getPathObj()
  const prev = path.segs[index - 1].item

  const segItems = [prev, item]

  for (let i = 1; i < 3; i++) {
    const id = index + 'c' + i

    const ctrlLine = cpt['c' + i + '_line'] = getCtrlLineMethod(id)

    const pt = getGripPtMethod(seg, { x: item['x' + i], y: item['y' + i] })
    const gpt = getGripPtMethod(seg, { x: segItems[i - 1].x, y: segItems[i - 1].y })

    assignAttributes(ctrlLine, {
      x1: pt.x,
      y1: pt.y,
      x2: gpt.x,
      y2: gpt.y,
      display: 'inline'
    })

    cpt['c' + i + '_line'] = ctrlLine

    // create it
    const pointGrip = cpt['c' + i] = addCtrlGripMethod(id)

    assignAttributes(pointGrip, {
      cx: pt.x,
      cy: pt.y,
      display: 'inline'
    })
    cpt['c' + i] = pointGrip
  }
  return cpt
}
@function module:path.getControlPoints
@param {Segment} seg
@returns {PlainObject<string, SVGLineElement|SVGCircleElement>}