home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / microcrn / issue_44.arc / MICROCAD.ARC / SQUARE.HPP < prev    next >
C/C++ Source or Header  |  1988-08-06  |  486b  |  23 lines

  1. // Figure 7 for "A Little CAD with C++"
  2. // Copyright 1988 Bruce Eckel
  3. // Permission required to distribute source
  4.  
  5. // file: square.hpp
  6. #ifndef SQUARE_HPP
  7. #define SQUARE_HPP
  8. #include <fg.h>
  9. #include "cadshape.hpp"
  10.  
  11. class square : public cadshape {
  12.     fg_box_t small_box;
  13.   public:
  14.     void draw();
  15.     square(unsigned x, unsigned y) : () {
  16.         x_center = x; y_center = y;
  17.         draw();
  18.     }
  19.     void erase();
  20.     ~square() { erase(); }
  21. };
  22. #endif SQUARE_HPP
  23.