android how to rotate canvas rect?

i create a rectangle in a specific size, and now i want rotate it to 45 degree, i used canvas.rotate, matrix, but no...