aboutsummaryrefslogtreecommitdiff
path: root/js/lib/drawing
diff options
context:
space:
mode:
authorPushkar Joshi2012-04-03 14:50:34 -0700
committerPushkar Joshi2012-04-03 14:50:34 -0700
commit79fb912bdaa22b8107bbddc93d1779820af80cf9 (patch)
tree022c08e2cff19d1599808037684b271dedecb146 /js/lib/drawing
parent06970d710f7172ee5ab736ef082c7703c61bfd0c (diff)
downloadninja-79fb912bdaa22b8107bbddc93d1779820af80cf9.tar.gz
working File I/O for pen tool created paths and some minor bug fixes (correctly setting the canvas for brush stroke file I/O, correct plane matrix for file I/O)
Diffstat (limited to 'js/lib/drawing')
-rwxr-xr-xjs/lib/drawing/world.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/js/lib/drawing/world.js b/js/lib/drawing/world.js
index 5a054224..a1a5b5ae 100755
--- a/js/lib/drawing/world.js
+++ b/js/lib/drawing/world.js
@@ -943,7 +943,7 @@ World.prototype.importObjectJSON = function( jObj, parentGeomObj )
943{ 943{
944 var type = jObj.type; 944 var type = jObj.type;
945 var BrushStroke = require("js/lib/geom/brush-stroke").BrushStroke; 945 var BrushStroke = require("js/lib/geom/brush-stroke").BrushStroke;
946 946 var SubPath = require("js/lib/geom/sub-path").SubPath;
947 var obj; 947 var obj;
948 switch (type) 948 switch (type)
949 { 949 {
@@ -962,6 +962,11 @@ World.prototype.importObjectJSON = function( jObj, parentGeomObj )
962 obj.importJSON( jObj ); 962 obj.importJSON( jObj );
963 break; 963 break;
964 964
965 case 5: //cubic bezier
966 obj = new SubPath();
967 obj.importJSON(jObj);
968 break;
969
965 case 6: //brush stroke 970 case 6: //brush stroke
966 obj = new BrushStroke(); 971 obj = new BrushStroke();
967 obj.importJSON(jObj); 972 obj.importJSON(jObj);