(self)
Step forward a single frame.
Step forward a single frame.
Step forward a single frame .
def _step(self):
        """Step forward a single frame."""
        coordinate = self._track_history[self._index][self._current + 1]

        #Calculate line between points
        if self._last_pos is None:
            mouse_coordinates = [coordinate]
        else:
            mouse_coordinates = [self._last_pos] + calculate_line(self._last_pos, coordinate) + [coordinate]
        self._last_pos = coordinate

        #Add to data
        for (x, y) in mouse_coordinates:
            
            try:
                try:
                    resolution, (x_offset, y_offset) = monitor_offset((x, y), self._resolution['Current'])
                except ValueError:
                    #TODO: Application resolution requires [var[0]], the other types don't, need to edit all of stored history to fix
                    resolution, (x_offset, y_offset) = monitor_offset((x, y), [self._resolution['Current'][0]])
            
            #Mouse outside bounds
            except TypeError:
                continue

            if resolution not in self._resolution['All']:
                self._resolution['All'].add(resolution)
                check_resolution(self._data, resolution)
                
            self._data['Resolution'][resolution]['Tracks'][y-y_offset][x-x_offset] = self._count
        
        self._current += 1
        self._count += 1
def _step ( self ) : coordinate = self . _track_history [ self . _index ] [ self . _current + 1 ] #Calculate line between points if self . _last_pos is None : mouse_coordinates = [ coordinate ] else : mouse_coordinates = [ self . _last_pos ] + calculate_line ( self . _last_pos , coordinate ) + [ coordinate ] self . _last_pos = coordinate #Add to data for ( x , y ) in mouse_coordinates : try : try : resolution , ( x_offset , y_offset ) = monitor_offset ( ( x , y ) , self . _resolution [ 'Current' ] ) except ValueError : #TODO: Application resolution requires [var[0]], the other types don't, need to edit all of stored history to fix resolution , ( x_offset , y_offset ) = monitor_offset ( ( x , y ) , [ self . _resolution [ 'Current' ] [ 0 ] ] ) #Mouse outside bounds except TypeError : continue if resolution not in self . _resolution [ 'All' ] : self . _resolution [ 'All' ] . add ( resolution ) check_resolution ( self . _data , resolution ) self . _data [ 'Resolution' ] [ resolution ] [ 'Tracks' ] [ y - y_offset ] [ x - x_offset ] = self . _count self . _current += 1 self . _count += 1