//>>built
define("dojox/drawing/plugins/tools/Iconize",["dojo","../../util/oo","../_Plugin","../../manager/_registry"],function(f,d,m,n){d=d.declare(m,function(b){},{onClick:function(){var b;for(b in this.stencils.stencils)if("path"==this.stencils.stencils[b].shortType){var e=this.stencils.stencils[b];break}e&&this.makeIcon(e.points)},makeIcon:function(b){var e=1E4,g=1E4;b.forEach(function(a){void 0===a.x||isNaN(a.x)||(e=Math.min(e,a.x),g=Math.min(g,a.y))});var h=0,k=0;b.forEach(function(a){void 0===a.x||isNaN(a.x)||
(a.x=Number((a.x-e).toFixed(1)),a.y=Number((a.y-g).toFixed(1)),h=Math.max(h,a.x),k=Math.max(k,a.y))});b.forEach(function(a){a.x=60*Number((a.x/h).toFixed(1))+20;a.y=60*Number((a.y/k).toFixed(1))+20});var c="[\n";f.forEach(b,function(a,p){c+="{\t";a.t&&(c+="t:'"+a.t+"'");void 0===a.x||isNaN(a.x)||(a.t&&(c+=", "),c+="x:"+a.x+",\t\ty:"+a.y);c+="\t}";p!=b.length-1&&(c+=",");c+="\n"});c+="]";var l=f.byId("data");l&&(l.value=c)}});d.setup={name:"dojox.drawing.plugins.tools.Iconize",tooltip:"Iconize Tool",
iconClass:"iconPan"};f.setObject("dojox.drawing.plugins.tools.Iconize",d);n.register(d.setup,"plugin");return d});