Rectangle.prototype=new Extra_Graphics;Rectangle.prototype.constructor=Rectangle;function Rectangle(a,d,b,c){this._x=a;this._y=d;this._w=b;this._h=c}Rectangle.prototype.draw=function(){try{var a=_MAP_WRAPPER.convert_to_pixel(this._x,this._y,true);_jg.setStroke(this.get_stroke());_jg.setColor(this.get_color());_jg.drawRect(a[0]-0.5*this._w,a[1]-0.5*this._h,this._w,this._h)}catch(b){throw"Rectangle.draw(): "+b}};Rectangle.prototype.snap_point=function(b,e){var d=new Array(this._x-0.5*_SNAP_TOLERANCE,this._y-0.5*_SNAP_TOLERANCE);var a=new Array(this._x+0.5*_SNAP_TOLERANCE,this._y+0.5*_SNAP_TOLERANCE);var c=new Array(this._x,this._y);if((b>d[0])&&(b<a[0])&&(e>d[1])&&(e<a[1])){return c}else{return false}};
