(self, args, default)
Set a pixel to a given attribute.
Set a pixel to a given attribute.
Set a pixel to a given attribute .
def _pset_preset(self, args, default):
        """Set a pixel to a given attribute."""
        if self._mode.is_text_mode:
            raise error.BASICError(error.IFC)
        step = next(args)
        x, y = (values.to_single(_arg).to_value() for _arg in islice(args, 2))
        attr_index = next(args)
        if attr_index is None:
            attr_index = default
        else:
            attr_index = values.to_int(attr_index)
            error.range_check(0, 255, attr_index)
        list(args)
        x, y = self._get_window_physical(x, y, step)
        attr = self._get_attr_index(attr_index)
        # record viewpoint-relative physical coordinates
        self._last_point = x, y
        self._last_attr = attr
        self.graph_view[y, x] = attr
def _pset_preset ( self , args , default ) : if self . _mode . is_text_mode : raise error . BASICError ( error . IFC ) step = next ( args ) x , y = ( values . to_single ( _arg ) . to_value ( ) for _arg in islice ( args , 2 ) ) attr_index = next ( args ) if attr_index is None : attr_index = default else : attr_index = values . to_int ( attr_index ) error . range_check ( 0 , 255 , attr_index ) list ( args ) x , y = self . _get_window_physical ( x , y , step ) attr = self . _get_attr_index ( attr_index ) # record viewpoint-relative physical coordinates self . _last_point = x , y self . _last_attr = attr self . graph_view [ y , x ] = attr