code: def resize(self, dims):
          
          width, height = dims[:2]
          self.dims = (width, height)
          self.logger.debug("renderer reconfigured to %dx%d" % (
              width, height))
  
          # create cv surface the size of the window
          # (cv just uses numpy arrays!)
          depth = len(self.rgb_order)
          self.surface = np.zeros((height, width, depth), dtype=np.uint8)
docs: Resize our drawing area to encompass a space defined by the
          given dimensions.