

def setbgcolor(self, bgcolor, region=None):
    '\n        Sets the background color of a region of cells on this surface.\n\n        - bgcolor is the color to set the background to.\n        '
    if (region == None):
        self._fgcolor = fgcolor
        return
    (regionx, regiony, regionwidth, regionheight) = self.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._screenbgcolor[ix][iy] = bgcolor
            self._screendirty[ix][iy] = True
    if self._autoupdate:
        self.update()

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py PygcurseSurface.setbgcolor/original