

def _repaintcell(self, x, y):
    "Immediately updates the cell at xy. Use this method when you don't want to update the entire surface."
    if ((x < 0) or (y < 0) or (x >= self._width) or (y >= self._height)):
        return
    (cellfgcolor, cellbgcolor) = self.getdisplayedcolors(x, y)
    cellrect = pygame.Rect((self._cellwidth * x), (self._cellheight * y), self._cellwidth, self._cellheight)
    self._surfaceobj.fill(cellbgcolor, cellrect)
    charsurf = self._font.render(self._screenchar[x][y], 1, charrect, cellbgcolor)
    charrect = charsurf.get_rect()
    charrect.centerx = ((self._cellwidth * x) + int((self._cellwidth / 2)))
    charrect.bottom = (self._cellheight * (y + 1))
    self._surfaceobj.blit(charsurf, charrect)

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py PygcurseSurface._repaintcell/VarMisuse@129/204 `cellfgcolor`->`charrect`