diff -r e4afd8643576 -r 239d372644a0 client/js/renderer/shapebuilder.js --- a/client/js/renderer/shapebuilder.js Tue Sep 09 17:49:31 2014 +0200 +++ b/client/js/renderer/shapebuilder.js Wed Sep 10 16:12:07 2014 +0200 @@ -57,15 +57,32 @@ return new paper.Path.Star([0, 0], 8, radius*1, radius*0.7); } }, + "svg": function(path){ + return { + getShape: function() { + return new paper.Path(path); + }, + getImageShape: function(center, radius) { + // No calcul for the moment + return new paper.Path(); + } + } + } }; var ShapeBuilder = function (shape){ + if(typeof shape==="undefined"){ + shape = "circle"; + } + if(shape.substr(0,4)=="svg:"){ + return builders["svg"](shape.substr(4)); + } if(!(shape in builders)){ shape = "circle"; } return builders[shape]; }; - + return ShapeBuilder; });