W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > July 2011

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

From: <bugzilla@jessica.w3.org>
Date: Mon, 18 Jul 2011 22:05:33 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1QivwT-0007LY-KU@jessica.w3.org>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:31:13 UTC