#include "MyroC.h" #include int main () { printf ("Program to create and display a white picture with a black dot\n"); Pixel blackPix = {0, 0, 0}; Pixel whitePix = {255, 255, 255}; // declare picture and set proper dimensions Picture myArt = {192, 256}; // alternatively, dimensions could be set as follows //myArt.width = 256; //myArt.height= 192; int row, col; /* color all pictures white */ for (row = 0; row < myArt.height; row++) { for (col = 0; col < myArt.width; col++) { myArt.pix_array [row][col] = whitePix; } } /* place 2-by-2 black dot in the middle of the picture */ myArt.pix_array [myArt.height/2] [myArt.width/2] = blackPix; myArt.pix_array [myArt.height/2] [myArt.width/2+1] = blackPix; myArt.pix_array [myArt.height/2+1][myArt.width/2] = blackPix; myArt.pix_array [myArt.height/2+1][myArt.width/2+1] = blackPix; /* display the image for 10 seconds */ rDisplayPicture (&myArt, 10, "display of myArt"); return 0; }