code: def resize(self, dims):
          
          width, height = dims[:2]
          self.dims = (width, height)
          self.logger.debug("renderer reconfigured to %dx%d" % (
              width, height))
          # create agg surface the size of the window
          self.surface = agg.Draw(self.rgb_order, self.dims, 'black')
docs: Resize our drawing area to encompass a space defined by the
          given dimensions.