def METHOD_NAME(cairo_context, x2, y2, x1, y1, line_width):
	"""Adds a triangular head to the current path."""
	if x1 == x2 and y1 == y2:
		line_angle = 0
	else:
		line_angle = math.atan2(y2 - y1, x2 - x1)
	sin, cos = math.sin(line_angle), math.cos(line_angle)
	# FIXME cases with very short last segment
	# if scale == line_width, dashed arrow will look like shit
	scale = max(line_width * 1.1, MIN_ARROW_SCALE)
	# when the last segment of the line is very short, the head is scaled down
	# last_segment_length = math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
	# scale = min(scale, last_segment_length/line_width)
	# ^XXX broken with dashes
	# TODO ça peut ne plus être nécessaire si je décale la tête
	head = []
	# scale, rotate and translate the arrow triangle
	for x, y in ARROW_TRIANGLE:
		p = (x * scale, y * scale)
		p = (p[0] * cos - p[1] * sin, p[0] * sin + p[1] * cos)
		p = (p[0] + x2, p[1] + y2)
		head.append(p)
	# draw the arrow triangle
	_draw_head(cairo_context, head, True)
	# shameful hack to get a full head in cases where the line is dashed
	if cairo_context.get_dash_count() > 0:
		_draw_head(cairo_context, head, False)
		_draw_head(cairo_context, head, False)
		_draw_head(cairo_context, head, False)
		_draw_head(cairo_context, head, False)
	# XXX the path isn't filled because the path is opened by the first point of
	# the line/curve and it can't be closed so easily
	cairo_context.close_path()
	# The stroke must be done afterwards, by the calling method