home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / microcrn / issue_44.arc / MICROCAD.ARC / LINE.HPP < prev    next >
Text File  |  1988-09-27  |  473b  |  23 lines

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