(self, from_row, from_col, to_row, to_col, attr, clear_wrap, adjust_end)
Clear a rectangular area of the screen (inclusive bounds; 1-based indexing).
        Does not clear pixels or submit to interface (which allows its use in put_rect).
Clear a rectangular area of the screen (inclusive bounds; 1-based indexing).
        Does not clear pixels or submit to interface (which allows its use in put_rect).
Clear a rectangular area of the screen ( inclusive bounds ; 1 - based indexing ) . Does not clear pixels or submit to interface ( which allows its use in put_rect ) .
def _clear_text_area(self, from_row, from_col, to_row, to_col, attr, clear_wrap, adjust_end):
        """
        Clear a rectangular area of the screen (inclusive bounds; 1-based indexing).
        Does not clear pixels or submit to interface (which allows its use in put_rect).
        """
        for row in self._rows[from_row-1:to_row]:
            row.chars[from_col-1:to_col] = [b' '] * (to_col - from_col + 1)
            row.attrs[from_col-1:to_col] = [attr] * (to_col - from_col + 1)
            if adjust_end and row.length <= to_col:
                row.length = min(row.length, from_col-1)
            if clear_wrap:
                row.wrap = False
        # we have to rebuild the DBCS buffer unless clearing the whole row or not enabled
        # as lead or trail bytes might have been replaced by spaces
        if self._dbcs_enabled and (to_col-from_col+1) < self._width:
            for row in range(from_row, to_row+1):
                # refresh whole row
                # characters earlier on the row may be affected, e.g. box-protected chars
                self._refresh_dbcs(row, 1, self._width)
        else:
            for row in range(from_row, to_row+1):
                self._dbcs_text[row-1][from_col-1:to_col] = [u' '] * (to_col-from_col+1)
def _clear_text_area ( self , from_row , from_col , to_row , to_col , attr , clear_wrap , adjust_end ) : for row in self . _rows [ from_row - 1 : to_row ] : row . chars [ from_col - 1 : to_col ] = [ b' ' ] * ( to_col - from_col + 1 ) row . attrs [ from_col - 1 : to_col ] = [ attr ] * ( to_col - from_col + 1 ) if adjust_end and row . length <= to_col : row . length = min ( row . length , from_col - 1 ) if clear_wrap : row . wrap = False # we have to rebuild the DBCS buffer unless clearing the whole row or not enabled # as lead or trail bytes might have been replaced by spaces if self . _dbcs_enabled and ( to_col - from_col + 1 ) < self . _width : for row in range ( from_row , to_row + 1 ) : # refresh whole row # characters earlier on the row may be affected, e.g. box-protected chars self . _refresh_dbcs ( row , 1 , self . _width ) else : for row in range ( from_row , to_row + 1 ) : self . _dbcs_text [ row - 1 ] [ from_col - 1 : to_col ] = [ u' ' ] * ( to_col - from_col + 1 )