'**SUMMARY**
This helper function for shear performs an affine rotation using the supplied matrix.
The matrix can be a either an openCV mat or an np.ndarray type.
The matrix should be a 2x3
**PARAMETERS**
* *rotMatrix* - A 2x3 numpy array or CvMat of the affine transform.
**RETURNS**
The rotated image. Note that the rotation is done in place, i.e. the image is not enlarged to fit the transofmation.
**EXAMPLE**
>>> img = Image("lenna")
>>> points = ((50,0),(img.width+50,0),(img.width,img.height),(0,img.height))
>>> src =  ((0, 0), (img.width-1, 0), (img.width-1, img.height-1))
>>> result = cv.createMat(2,3,cv.CV_32FC1)
>>> cv.GetAffineTransform(src,points,result)
>>> img.transformAffine(result).show()
**SEE ALSO**
:py:meth:`shear`
:py:meth`warp`
:py:meth:`transformPerspective`
:py:meth:`rotate`
http://en.wikipedia.org/wiki/Transformation_matrix'

def transformAffine(self, rotMatrix):

    retVal = self.getEmpty()
    if (type(rotMatrix) == np.ndarray):
        rotMatrix = npArray2cvMat(rotMatrix)
    cv.WarpAffine(self.getBitmap(), retVal, rotMatrix)
    return Image(retVal, colorSpace=self._colorSpace)
