code: def do_region(self, x, y, w, h):
          
          if (x is None):
              self.rx = 0
              self.ry = 0
              self.rw = self.width
              self.rh = self.height
          else:
              self.rx = x
              self.ry = y
              self.rw = w
              self.rh = h
docs: Record region.