(self, row, col, chars, attr)
return sprite
Draw a chunk of text in a single attribute to pixels and interface.
Draw a chunk of text in a single attribute to pixels and interface.
Draw a chunk of text in a single attribute to pixels and interface .
def _draw_text_chunk(self, row, col, chars, attr):
        """Draw a chunk of text in a single attribute to pixels and interface."""
        if row < 1 or col < 1 or row > self._height or col > self._width:
            logging.debug('Ignoring out-of-range text rendering request: row %d col %d', row, col)
            return
        _, back, _, underline = self._colourmap.split_attr(attr)
        # update pixel buffer
        left, top = self.text_to_pixel_pos(row, col)
        sprite = self._font.render_text(chars, attr, back, underline)
        self._pixels[top:top+sprite.height, left:left+sprite.width] = sprite
        return sprite
def _draw_text_chunk ( self , row , col , chars , attr ) : if row < 1 or col < 1 or row > self . _height or col > self . _width : logging . debug ( 'Ignoring out-of-range text rendering request: row %d col %d' , row , col ) return _ , back , _ , underline = self . _colourmap . split_attr ( attr ) # update pixel buffer left , top = self . text_to_pixel_pos ( row , col ) sprite = self . _font . render_text ( chars , attr , back , underline ) self . _pixels [ top : top + sprite . height , left : left + sprite . width ] = sprite return sprite