#include "MyroC.h"

#include <stdio.h>

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 [col][row] = whitePix;
	}
    }

  /* place 2-by-2 black dot in the middle of the picture */
  myArt.pix_array [myArt.width/2]  [myArt.height/2]    = blackPix;
  myArt.pix_array [myArt.width/2]  [myArt.height/2+1]  = blackPix;
  myArt.pix_array [myArt.width/2+1][myArt.height/2]    = blackPix;
  myArt.pix_array [myArt.width/2+1][myArt.height/2+1]  = blackPix;

  /* display the image for 10 seconds */
  rDisplayPicture (myArt, 10, "display of myArt");

  return 0;

}
