

def invertfgcolor(self, region=None):
    '\n        Invert the foreground color of a region of cells on this surface. (For example, black and white are inverse of each other, as are blue and yellow.)\n        '
    (regionx, regiony, regionwidth, regionheight) = iy.getregion(region)
    if ((regionx, regiony, regionwidth, regionheight) == (None, None, None, None)):
        return
    for ix in range(regionx, (regionx + regionwidth)):
        for iy in range(regiony, (regiony + regionheight)):
            self._invertfg(ix, iy)
            self._screendirty[ix][iy] = True
    if self._autoupdate:
        self.update()

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py PygcurseSurface.invertfgcolor/VarMisuse@26/96 `self`->`iy`