[Bug 13277] canvas '2d' context needs a getter for current point in path

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13277

--- Comment #1 from Patrick <phorgan1@gmail.com> 2011-07-18 22:05:32 UTC ---
Another example of where it could be useful came up today.  I wanted to do
something like:

CanvasRenderingContext2D.prototype.drawLineAtAngle =
                        function(ctx,x0,y0,angle,length)
{
    this.save();
   
this.lineTo(curpointX+length*Math.cos(angle),curPointY+length*Math.sin(angle));
    this.stroke();
    this.restore();
}

But of course there's no way to get the current point, so the context2D is not
extensible like this.  If the getter method(s) would just supply this it would
be great!

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 18 July 2011 22:05:34 UTC