Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.

Categories

0 votes
asked ago in CSC201 by (108 points)

1 Answer

0 votes

You need to think about the size of the original image (which is the number on the first line of the file that you are reading) and the size of the window that the image will be drawn in.

For example, if the image is size 200 and the window size 600, then each of the x and y coordinates would be multiplied by 3 to scale them up.

If the image is size 1000 and the window size 600, then each of the x and y coordinates would be multiplied by 0.6 to scale them down.

You need to generalize so that no matter the size of the image or the value of WINDOW_SIZE you can compute the multiplier you need.

answered ago by (4.2k points)
...