Answered step by step
Verified Expert Solution
Question
1 Approved Answer
8. (20 points) Your job is to write the fill function for a raster-based graphics program. The graphic is stored in a 2D array of
8. (20 points) Your job is to write the fill function for a raster-based graphics program. The graphic is stored in a 2D array of colors, where colors are an enum. The input to the function is the row and column cell of the pixel to be colored and what color to change it to. Since the goal is to fill the enclosed shape with one color, each call should also recurse in the four cardinal directions. Also make sure that the function calls are within bounds (MIN, MAX) const int MAX = 1000 ; const int MIN = ; enum color IBLACK, WHITE!; color picture[MAX] [MAX]; void Fill(int row, int col, color c)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started