The process we used to draw borders could actually be used to draw lines as well. For

Question:

The process we used to draw borders could actually be used to draw lines as well. For example, if you have a square picture, every pixel whose x value equals its y value lies on the diagonal from upper-left to lower-right corners. Write a function that inputs a square picture (you can assume square) and an input color, and draws a diagonal line from upper-left to lower-right using the input color for the line color.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: