fixed Chrome 27 bug which was drawing circles as rectangles

This commit is contained in:
Eric Rowell
2013-06-06 21:56:40 -07:00
parent 8a5ad235bd
commit 51643bcada
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
(function() {
var PIx2 = Math.PI * 2,
// the 0.0001 offset fixes a bug in Chrome 27
var PIx2 = (Math.PI * 2) - 0.0001,
CIRCLE = 'Circle';
/**
@@ -46,7 +47,7 @@
var context = canvas.getContext();
context.beginPath();
context.arc(0, 0, this.getRadius(), 0, PIx2, true);
context.arc(0, 0, this.getRadius(), 0, PIx2, false);
context.closePath();
canvas.fillStroke(this);
},

View File

@@ -13,7 +13,7 @@ Test.Modules.TWEEN = {
y: stage.getHeight() / 2,
radius: 70,
fill: 'green',
stroke: 'black',
stroke: 'blue',
strokeWidth: 4
});