code: public void invalidateRegion (int x, int y, int width, int height)
      {
          if (isValidSize(width, height)) {
              addDirtyRegion(new Rectangle(x, y, width, height));
          }
      }
docs: Invalidates the specified region.