code: func linelabel(canvas *svg.SVG, x1, y1, x2, y2 int, label string, mark string, d1 string, d2 string, dir string, color string) {
  	aw := linesize * 4
  	ah := linesize * 3
  
  	if len(color) == 0 {
  		color = lcolor
  	}
  	switch mark {
  	case "b":
  		lx1, ly1 := arrow(canvas, x1, y1, aw, ah, d1, color)
  		lx2, ly2 := arrow(canvas, x2, y2, aw, ah, d2, color)
  		doline(canvas, lx1, ly1, lx2, ly2, linestyle(color), dir, label)
  
  	case "s":
  		lx1, ly1 := arrow(canvas, x1, y1, aw, ah, d1, color)
  		doline(canvas, lx1, ly1, x2, y2, linestyle(color), dir, label)
  
  	case "d":
  		lx2, ly2 := arrow(canvas, x2, y2, aw, ah, d2, color)
  		doline(canvas, x1, y1, lx2, ly2, linestyle(color), dir, label)
  
  	default:
  		doline(canvas, x1, y1, x2, y2, linestyle(color), dir, label)
  	}
  }
docs: // linelabel determines the connection and arrow geometry