'**SUMMARY**
Draw a rectangle on the screen given the upper left corner of the rectangle
and the width and height.
**PARAMETERS**
* *x* - the x position.
* *y* - the y position.
* *w* - the width of the rectangle.
* *h* - the height of the rectangle.
* *color* - an RGB tuple indicating the desired color.
* *width* - the width of the rectangle, a value less than or equal to zero means filled in completely.
* *alpha* - the alpha value on the interval from 255 to 0, 255 is opaque, 0 is completely transparent.
**RETURNS**
None - this operation is in place and adds the rectangle to the drawing layer.
**EXAMPLE**
>>> img = Image("lenna")
>>> img.drawREctange( 50,50,100,123)
>>> img.show()
**SEE ALSO**
:py:meth:`dl`
:py:meth:`drawCircle`
:py:meth:`drawRectangle`
:py:meth:`applyLayers`
:py:class:`DrawingLayer`'

def drawRectangle(self, x, y, w, h, color=Color.RED, width=1, alpha=255):

    if (width < 1):
        self.getDrawingLayer().rectangle((x, y), (w, h), color, filled=True, alpha=alpha)
    else:
        self.getDrawingLayer().rectangle((x, y), (w, h), color, width, alpha=alpha)
