KingPsychopath / explorercanvas

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

arcScaleX_ and arcScaleY_ are not set correctly by setTransform() #83

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call setTransform() with scaling.
2. Draw an arc (ctx.beginpath, ctx.arc, etc.)

You should see an arc, transformed according to the transform passed to 
setTransform. This is the behavior in native canvas implementations.

In excanvas, internal variables arcScaleX_ and arcScaleY_ are not changed by 
setTransform, so the arc does not appear.

I fixed it by adding three lines to setM method (after line 823):

      var rootDet = sqrt(abs(det));
      ctx.arcScaleX_    = rootDet;
      ctx.arcScaleY_    = rootDet;

Original issue reported on code.google.com by hsteveco...@gmail.com on 3 Aug 2010 at 4:10