'**SUMMARY***
This function rotates an image around a specific point by the given angle
By default in "fixed" mode, the returned Image is the same dimensions as the original Image, and the contents will be scaled to fit.  In "full" mode the
contents retain the original size, and the Image object will scale
by default, the point is the center of the image.
you can also specify a scaling parameter
.. Note:
that when fixed is set to false selecting a rotation point has no effect since the image is move to fit on the screen.
**PARAMETERS**
* *angle* - angle in degrees positive is clockwise, negative is counter clockwise
* *fixed* - if fixed is true,keep the original image dimensions, otherwise scale the image to fit the rotation
* *point* - the point about which we want to rotate, if none is defined we use the center.
* *scale* - and optional floating point scale parameter.
**RETURNS**
The rotated SimpleCV image.
**EXAMPLE**
>>> img = Image(\'logo\')
>>> img2 = img.rotate( 73.00, point=(img.width/2,img.height/2))
>>> img3 = img.rotate( 73.00, fixed=False, point=(img.width/2,img.height/2))
>>> img4 = img2.sideBySide(img3)
>>> img4.show()
**SEE ALSO**
:py:meth:`rotate90`'

def rotate(self, angle, fixed=True, point=[(-1), (-1)], scale=1.0):

    if ((point[0] == (-1)) or (point[1] == (-1))):
        point[0] = ((self.width - 1) / 2)
        point[1] = ((self.height - 1) / 2)
    if fixed:
        retVal = self.getEmpty()
        cv.Zero(retVal)
        rotMat = cv.CreateMat(2, 3, cv.CV_32FC1)
        cv.GetRotationMatrix2D((float(point[0]), float(point[1])), float(angle), float(scale), rotMat)
        cv.WarpAffine(self.getBitmap(), retVal, rotMat)
        return Image(retVal, colorSpace=self._colorSpace)
    rotMat = cv.CreateMat(2, 3, cv.CV_32FC1)
    cv.GetRotationMatrix2D((float(point[0]), float(point[1])), float(angle), float(scale), rotMat)
    A = np.array([0, 0, 1])
    B = np.array([self.width, 0, 1])
    C = np.array([self.width, self.height, 1])
    D = np.array([0, self.height, 1])
    a = np.dot(rotMat, A)
    b = np.dot(rotMat, B)
    c = np.dot(rotMat, C)
    d = np.dot(rotMat, D)
    minY = min(a[1], b[1], c[1], d[1])
    minX = min(a[0], b[0], c[0], d[0])
    maxY = max(a[1], b[1], c[1], d[1])
    maxX = max(a[0], b[0], c[0], d[0])
    newWidth = np.ceil((maxX - minX))
    newHeight = np.ceil((maxY - minY))
    tX = 0
    tY = 0
    if (minX < 0):
        tX = ((-1.0) * minX)
    elif (maxX > (newWidth - 1)):
        tX = ((-1.0) * (maxX - newWidth))
    if (minY < 0):
        tY = ((-1.0) * minY)
    elif (maxY > (newHeight - 1)):
        tY = ((-1.0) * (maxY - newHeight))
    src = ((A[0], A[1]), (B[0], B[1]), (C[0], C[1]))
    dst = (((a[0] + tX), (a[1] + tY)), ((b[0] + tX), (b[1] + tY)), ((c[0] + tX), (c[1] + tY)))
    cv.GetAffineTransform(src, dst, rotMat)
    retVal = cv.CreateImage((int(newWidth), int(newHeight)), 8, int(3))
    cv.Zero(retVal)
    cv.WarpAffine(self.getBitmap(), retVal, rotMat)
    return Image(retVal, colorSpace=self._colorSpace)
