(self, index, data)
Set a pixel range, clear affected text buffers and submit to interface.
Set a pixel range, clear affected text buffers and submit to interface.
Set a pixel range clear affected text buffers and submit to interface .
def __setitem__(self, index, data):
        """Set a pixel range, clear affected text buffers and submit to interface."""
        self._pixels[index] = data
        # make sure the indices are slices so that __getattr__ returns a matrix
        yslice, xslice = index
        if not isinstance(yslice, slice):
            yslice = slice(yslice, yslice+1)
        if not isinstance(xslice, slice):
            xslice = slice(xslice, xslice+1)
        self._video_buffer._update_pixels(yslice.start, xslice.start, yslice.stop-1, xslice.stop-1)
def __setitem__ ( self , index , data ) : self . _pixels [ index ] = data # make sure the indices are slices so that __getattr__ returns a matrix yslice , xslice = index if not isinstance ( yslice , slice ) : yslice = slice ( yslice , yslice + 1 ) if not isinstance ( xslice , slice ) : xslice = slice ( xslice , xslice + 1 ) self . _video_buffer . _update_pixels ( yslice . start , xslice . start , yslice . stop - 1 , xslice . stop - 1 )