arrowTo
で関数を作成したいCanvasRenderingContext2D.prototype
。そのためには、最後のポイントの座標を取得する必要があります。たとえば、
//...
var ctx = someCanvas.getContext('2d');
ctx.moveTo(10,40);
//the coordinates of the last point are now (10,40)
ctx.lineTo(50,50);
//and now it's (50,50)
//...
どうすればそれらを取得できますか?