Question: In the file fill.cpp , write a function using canvas, which is a 2 dimensional array declared to be ROWS by COLS, and the function
In the file fill.cpp write a function using canvas, which is a dimensional array declared to be ROWS by COLS, and the function prototype
void drawStripeint width, Pixel canvasCOLSint nRows, int nCols;
that sets the diagonal of the canvas to BLACK
BLACK is a value of the enumeration type Pixel defined in fill.h and just like in Assignment #
The diagonal stripe has a width and the stripe is to precondition:
Office on the web Frame and corner of the canvas
width
nRows leq ROWS
nCols leq COLS
When setting the pixels to BLACK in drawStripe, the BLACK pixels must be within the boundaries of the nRows by nCols defined canvas.
The unittestfillcpp has many test cases with expected output.
If you do not want debugging output, uncomment the #define NDEBUG in the unittestfillcpp
See the next page for examples printed out when running testfill
: rows columns stripe width :
: :
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
