begin arrowhead r
  # Draw arrowhead rotated to point to end of line.
  #
  rotate r
  move 5, 2
  draw 0, 0, 5, -2
  closepath
  fill
end
begin arrowstart
  # Split path into points with large spacing so there will be
  # only one sample point at start of line.  Draw arrowhead there.
  #
  samplepath 99999, 0
  arrowhead 0
end
begin arrowend
  # Draw arrowhead at end of line.
  #
  samplepath -99999, 0
  arrowhead 180
end
newpage "eps", "tutoriallines5.eps", 60, 30
clearpath
move 5, 5
draw 45, 5
arc -1, 45, 15, 55, 15
draw 55, 25
linestyle 0.3
color '#a020f0'
stroke
# Demonstrate drawing a line with arrows at both ends like <---->
#
arrowstart
arrowend
