Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

Students also viewed these Databases questions