// File: artist.cpp // Date: 02 Feb 2005 // Author: Goldwasser // // This file serves as a stencil for the 'artist' programming // assignment, which makes use of the EzWindows graphics package. // // It can be compiled with the associated Makefile by typing 'make' // which results in an executable named 'artist' #include // the following includes a variety of shapes for your use #include "circle.h" #include "ellipse.h" #include "label.h" #include "ray.h" #include "rect.h" #include "square.h" #include "triangle.h" // Later in this file we include a convenient utility which // we've named 'delay'. You may use this in one of two ways. // The simple command: // delay(); // will cause the program to prompt the use to hit return before // continuing. An alternate form of this command is the form: // delay(3); // which will cause the program to wait three seconds and then // continue (though without need for the user to enter return). // The parameter '3' can be any positive integer. void delay(int=-1); // your code should be placed within this routine. int ApiMain() { // This next line forces the user to enter return before the program // ends. (without this, your drawing would disappear immediately // upon reaching the end of the program) delay(); } // This is the implementation of our delay utility. // YOU DO NOT NEED TO BOTHER READING IT void delay(int waittime) { if (waittime>=0) sleep(waittime); else { cout << "press return to continue" << endl; string buffer; getline(cin,buffer); } }