//>>built
define("dojox/drawing/plugins/drawing/Grid",["dojo","../../util/oo","../_Plugin"],function(d,b,n){b=b.declare(n,function(a){if(a.gap)this.major=a.gap;this.majorColor=a.majorColor||this.majorColor;this.minorColor=a.minorColor||this.minorColor;this.setGrid();d.connect(this.canvas,"setZoom",this,"setZoom")},{type:"dojox.drawing.plugins.drawing.Grid",gap:100,major:100,minor:0,majorColor:"#00ffff",minorColor:"#d7ffff",zoom:1,setZoom:function(a){this.zoom=a;this.setGrid()},setGrid:function(){var a=Math.floor(this.major*
this.zoom),b=this.minor?Math.floor(this.minor*this.zoom):a;this.grid&&this.grid.removeShape();var e,h,f,i,c,j,k,g=this.canvas.underlay.createGroup(),d=this.majorColor,l=this.minorColor,m=function(a,b,c,d,e){g.createLine({x1:a,y1:b,x2:c,y2:d}).setStroke({style:"Solid",width:1,cap:"round",color:e})};for(c=1,k=1E3/b;c<k;c++)e=0,h=2E3,i=f=b*c,j=f%a?l:d,m(e,f,h,i,j);for(c=1,k=2E3/b;c<k;c++)f=0,i=1E3,h=e=b*c,j=e%a?l:d,m(e,f,h,i,j);g.moveToBack();this.grid=g;this.util.attr(g,"id","grid");return g}});d.setObject("dojox.drawing.plugins.drawing.Grid",
b);return b});