aboutsummaryrefslogtreecommitdiff
path: root/assets/canvas-runtime.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/canvas-runtime.js')
-rw-r--r--assets/canvas-runtime.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index c0c4ccfc..3ed7ed0f 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -1920,6 +1920,12 @@ NinjaCvsRt.RuntimeSubPath = Object.create(NinjaCvsRt.RuntimeGeomObj, {
1920 _strokeColor: {value: null, writable: true}, 1920 _strokeColor: {value: null, writable: true},
1921 _fillColor: {value: null, writable: true}, 1921 _fillColor: {value: null, writable: true},
1922 1922
1923 geomType: {
1924 value: function () {
1925 return this.GEOM_TYPE_CUBIC_BEZIER;
1926 }
1927 },
1928
1923 importJSON: { 1929 importJSON: {
1924 value: function(jo) { 1930 value: function(jo) {
1925 if (this.geomType()!== jo.geomType){ 1931 if (this.geomType()!== jo.geomType){
@@ -1929,7 +1935,7 @@ NinjaCvsRt.RuntimeSubPath = Object.create(NinjaCvsRt.RuntimeGeomObj, {
1929 this._Anchors = []; 1935 this._Anchors = [];
1930 var i=0; 1936 var i=0;
1931 for (i=0;i<jo.anchors.length;i++){ 1937 for (i=0;i<jo.anchors.length;i++){
1932 var newAnchor = new NinjaCvsRt.AnchorPoint(); 1938 var newAnchor = Object.create(NinjaCvsRt.AnchorPoint);
1933 var ipAnchor = jo.anchors[i]; 1939 var ipAnchor = jo.anchors[i];
1934 newAnchor.setPos(ipAnchor._x, ipAnchor._y, ipAnchor._z); 1940 newAnchor.setPos(ipAnchor._x, ipAnchor._y, ipAnchor._z);
1935 newAnchor.setPrevPos(ipAnchor._prevX, ipAnchor._prevY, ipAnchor._prevZ); 1941 newAnchor.setPrevPos(ipAnchor._prevX, ipAnchor._prevY, ipAnchor._prevZ);
@@ -1993,8 +1999,8 @@ NinjaCvsRt.RuntimeSubPath = Object.create(NinjaCvsRt.RuntimeGeomObj, {
1993 var currAnchor = this._Anchors[0]; 1999 var currAnchor = this._Anchors[0];
1994 ctx.bezierCurveTo(prevAnchor.getNextX(),prevAnchor.getNextY(), currAnchor.getPrevX(), currAnchor.getPrevY(), currAnchor.getPosX(), currAnchor.getPosY()); 2000 ctx.bezierCurveTo(prevAnchor.getNextX(),prevAnchor.getNextY(), currAnchor.getPrevX(), currAnchor.getPrevY(), currAnchor.getPosX(), currAnchor.getPosY());
1995 prevAnchor = currAnchor; 2001 prevAnchor = currAnchor;
1996 ctx.fill();
1997 } 2002 }
2003 ctx.fill();
1998 ctx.stroke(); 2004 ctx.stroke();
1999 } 2005 }
2000 ctx.restore(); 2006 ctx.restore();