title: Drawing a rotating rectangle around shapely polygon
body: <p>i have polygon coordinates and i have plotted a polygon using PolygonPatch. Next up, using moments i have center coordinates (x,y) , height and width(X,Y) and rotation angle (theta). using these parameters i want draw the bounding rectangle around my polygon . i can draw these rotated rectangle using opencv </p>
  
  <pre><code>rect = cv2.minAreaRect(cnt)
  box = cv2.cv.BoxPoints(rect)
  box = np.int0(box)
  cv2.drawContours(im,[box],0,(0,0,255),2)
  </code></pre>
  
  <p>but this only works when i am working on images not on shapley polygon patch. Is there a way i can draw the rotated rectangle around ploygonpatch without converting them to images.</p>