Stephen, Bob, and Tomato's Canvas

When drawing a line from (2, 2) to (4, 4), the following cells will be updated to asterisks: (2, 2), (3, 3) and (4, 4). When drawing a rectangle with the corners (2, 2) and (5, 6), the following cells will be updated to asterisks: (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (3, 2), (4, 2), (3, 6), (4, 6). When filling the space around the cell (3, 4) with ‘r’, only the space inside the rectangle and above the line will be filled with ‘r’. When filling the space around the cell (1, 1) with ‘g’, all of the space outside of the rectangle will be filled with ‘g’.

This is a companion discussion topic for the original entry at https://toph.co/p/stephen-bob-and-tomato-s-canvas