bug fix: rectangles not rendered properly in all cases.  took min x, max y as starting point
  rectangles are assumed to be upper left corner with width height