I realize this might be more of a math problem.
To draw the lines for my rectangles I need to solve for their corners. I have a rectangle center at (x,y) With a def
One of the easiest ways to do this is to take the location of the point before rotation and then apply a coordinate transform. Since it's centred on (0,0), this is simply a case of using:
x' = x cos(theta) - y sin(theta)
y' = y cos(theta) + x sin(theta)