code: func arrow(canvas *svg.SVG, x, y, w, h int, dir string, color string) (xl, yl int) {
  	var xp = []int{x, x, x, x}
  	var yp = []int{y, y, y, y}
  
  	n := notchsize
  	switch dir {
  	case "r":
  		xp[1] = x - w
  		yp[1] = y - h/2
  		xp[2] = (x - w) + n
  		yp[2] = y
  		xp[3] = x - w
  		yp[3] = y + h/2
  		xl, yl = xp[2], y
  	case "l":
  		xp[1] = x + w
  		yp[1] = y - h/2
  		xp[2] = (x + w) - n
  		yp[2] = y
  		xp[3] = x + w
  		yp[3] = y + h/2
  		xl, yl = xp[2], y
  	case "u":
  		xp[1] = x - w/2
  		yp[1] = y + h
  		xp[2] = x
  		yp[2] = (y + h) - n
  		xp[3] = x + w/2
  		yp[3] = y + h
  		xl, yl = x, yp[2]
  	case "d":
  		xp[1] = x - w/2
  		yp[1] = y - h
  		xp[2] = x
  		yp[2] = (y - h) + n
  		xp[3] = x + w/2
  		yp[3] = y - h
  		xl, yl = x, yp[2]
  	}
  	canvas.Polygon(xp, yp, "fill:"+color+";fill-opacity:"+lopacity)
  	return xl, yl
  }
docs: // arrow constructs line-ending arrows according to connecting points