Visualizes sort functions. Allows user inputted source functions along with some base sort functions.
Add text at bottom of GUI. Make sure it is written in python, implements draw, and is properly indented.
If you want to add a sort functions by file, instead of by text. Follow these instructions:
- Upload file to folder: sortFunctions
- Import function to gui
- Add function to factory: get_sort_function_factory
- Add to: choices
Uses to draw on the canvas. Should be called every time canvas needs updated.
- canvas: tkinter canvas (or other canvas that implements same interface), which the objects will be drawn on
- array: array that needs sorted
- red_pointer_locations: default is empty. Displays the rectangles at the indexes as red
- green_pointer_locations: default is empty. Displays the rectangles at the index as green
- margin_top, margin_bottom_ margin_left, margin_right: default for bottom is 0. The others are defaulted to 10. Sets the margins of the canvas