JonazMartinez / explorercanvas

Automatically exported from code.google.com/p/explorercanvas
Apache License 2.0
0 stars 0 forks source link

State not properly kept when drawing #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
From

https://sourceforge.net/tracker2/?
func=detail&aid=1494496&group_id=163391&atid=827560

The state is not being properly kept when I draw
objects. If I execute the following code on Firefox, I
get a square and an ellipse, in excanvas I get a square
and a circle. (I am using prototype for getting the
element of my canvas).

CanvasRenderingContext2D.prototype.drawEllipse=function(startx,starty,width
,height)
{
this.save();
this.scale(width/height,height/width);
this.arc(startx,starty,width,0,2*Math.PI,false);
this.restore();
}

function start()
{
ctx=$("canvas").getContext("2d");
ctx.lineWidth=5;
ctx.strokeStyle="#ff0000";
ctx.rect(50,50,25,25);
ctx.drawEllipse(300,300,200,100);
ctx.stroke();
}

Thanks for all your hard work!

Original issue reported on code.google.com by erik.arv...@gmail.com on 22 Mar 2009 at 12:36

GoogleCodeExporter commented 9 years ago
Looks like the specification has changed since we first implemented some of the 
drawing functions. I'll look into updating it to match the latest version of 
the 
spec.

Original comment by eae%eae.net@gtempaccount.com on 22 Mar 2009 at 7:36