index.js
function (x, y, width, height, color) {

		var i,
			iLen = x + width,
			j,
			jLen = y + height,
			index;

		for (i = x; i < iLen; i++) {
			for (j = y; j < jLen; j++) {
				index = this.getIndex(i, j);
				this.setAtIndex(index, color);
			}
		}
	}
function (x, y, width, height, color) {

		var i,
			iLen = x + width,
			j,
			jLen = y + height,
			index;

		for (i = x; i < iLen; i++) {
			for (j = y; j < jLen; j++) {
				index = this.getIndex(i, j);
				this.setAtIndex(index, color);
			}
		}
	}
function ( x , y , width , height , color ) { var i , iLen = x + width , j , jLen = y + height , index ; for ( i = x ; i < iLen ; i ++ ) { for ( j = y ; j < jLen ; j ++ ) { index = this . getIndex ( i , j ) ; this . setAtIndex ( index , color ) ; } } }
Fills an area with the specified color

@method fillRect
@param {int} x Starting x-coordinate
@param {int} y Starting y-coordinate
@param {int} width Width of area relative to starting coordinate
@param {int} height Height of area relative to starting coordinate
@param {object} color
@param {int} [color.red] Red channel of color to set
@param {int} [color.green] Green channel of color to set
@param {int} [color.blue] Blue channel of color to set
@param {int} [color.alpha] Alpha channel for color to set
@param {float} [color.opacity] Opacity of color
Fills an area with the specified color