Well you didn't give a whole lot of detail. I'm assuming you know that the height and width of the rectangle will give you the area no matter the rotation. If you only have the x,y data points then you use the sqrt((x1-x1)^2 + (y1-y2)^2)
. To get the length of a side.
You clarified your question so if you have a rectangle and you know the angle from the top left corner is rotated away from the top so the left side looks like this.
/
/
a = sine(alpha)*width
b = cosine(alpha)*width
c = sine(alpha)*height
d = cosine(alpha)*height
width = a + d
height = b + c
Be sure you get the angle right it is kind of hard to clarify it on here. If you get the other angle then it will come out to
width = b + c
height = a + d