Skip to content
Browse files

Fix fill path center

  • Loading branch information...
1 parent 3ba0bfe commit e0aa364d0e4bfa526861d100592ae14d8d50bb45 @em committed Feb 23, 2014
Showing with 5 additions and 3 deletions.
  1. +2 −1 build/gcanvas.js
  2. +1 −0 lib/gcanvas.js
  3. +1 −1 lib/path.js
  4. +1 −1 package.json
View
3 build/gcanvas.js
@@ -524,6 +524,7 @@ GCanvas.prototype = {\n\
}\n\
\n\
var path = this.path;\n\
+ path = path.simplify();\n\
\n\
if(path.subPaths)\n\
path.subPaths.forEach(function(subPath) {\n\
@@ -1668,7 +1669,7 @@ Path.prototype = {\n\
var path = this;\n\
\n\
var max = path.estimateMaxOffset(5).lt;\n\
- max -= diameter; \n\
+ max -= diameter/2; \n\
\n\
for(var i = -max; i < -diameter/2; i += diameter*overlap) {\n\
var offsetPath = path.offset(i, divisions).reverse();\n\
View
1 lib/gcanvas.js
@@ -321,6 +321,7 @@ GCanvas.prototype = {
}
var path = this.path;
+ path = path.simplify();
if(path.subPaths)
path.subPaths.forEach(function(subPath) {
View
2 lib/path.js
@@ -336,7 +336,7 @@ Path.prototype = {
var path = this;
var max = path.estimateMaxOffset(5).lt;
- max -= diameter;
+ max -= diameter/2;
for(var i = -max; i < -diameter/2; i += diameter*overlap) {
var offsetPath = path.offset(i, divisions).reverse();
View
2 package.json
@@ -1,6 +1,6 @@
{
"name": "gcanvas",
- "version": "0.0.18",
+ "version": "0.0.19",
"description": "A Canvas API implementation that generates Gcode",
"keywords": [
"canvas",

0 comments on commit e0aa364

Please sign in to comment.
Something went wrong with that request. Please try again.