I’m trying to draw curved arrows in a html canvas. I have no problem to draw a curved line but I don’t know how to put the > at the end of the line (direction).
ctx.beginPath();
ctx.fillStyle = "rgba(55, 217, 56,"+ opacity +")";
ctx.moveTo(this.fromX,this.fromY);
ctx.quadraticCurveTo(this.controlX, this.controlY, this.toX, this.toY);
ctx.stroke();
My idea is taking a small part of the line at the end and draw a triangle.
How can I get the coordinate of a point in the line?
Below is the image for better understanding.

Since you’re using a quadratic curve, you know two points that make a line that points in the “direction” of your arrow head:
So throw down a smidge of trig and you have yourself a solution. Here’s a generalized function that will do it for you:
http://jsfiddle.net/SguzM/