add new 'add' method to OpenLayers.Pixel -- eventually this will replace addX, addY, and addSize.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@48 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-05-16 18:24:33 +00:00
parent 57752d9cd4
commit 6605cd0984

View File

@@ -114,6 +114,18 @@ OpenLayers.Pixel.prototype = {
return new OpenLayers.Pixel(this.x, this.y+h);
},
/** Return a new Pixel with this pixel's x&y augmented by
* the int values passed in.
*
* @param {int} x
* @param {int} x
*
* @return {OpenLayers.Pixel}
*/
add:function(x, y) {
return new OpenLayers.Pixel(this.x + x, this.y + y);
},
////////////////////
who:function(){return "OpenLayers.Pixel";}
};