home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pctchnqs / 1991 / number2 / charactr.hpp < prev    next >
C/C++ Source or Header  |  1991-03-08  |  1KB  |  40 lines

  1. //-------------------------------------------------------------//
  2. // File:   Charactr.Hpp                                        //
  3. // Desc:   Definition of a Character Class                     //
  4. // Author: Marv Luse, Autumn Hill Software                     //
  5. //-------------------------------------------------------------//
  6.  
  7. #ifndef _CHARACTR_HPP_
  8. #define _CHARACTR_HPP_
  9.  
  10. #include "BitMask.Hpp"
  11.  
  12. class Font;
  13. class HpFont;
  14.  
  15. //........ Character Class
  16.  
  17. class Character : public BitMask
  18. {
  19.       friend class Font;
  20.       friend class HpFont;
  21.  
  22.    protected:
  23.  
  24.       int   left_ofs;     // ref-pt to left edge dist
  25.       int   top_ofs;      // ref-pt to top edge dist
  26.       int   delta_x;      // ref-pt to next ref-pt dist
  27.  
  28.    public:
  29.  
  30.       Character( );
  31.       Character( int w, int h, char *m );
  32.      ~Character( );
  33.       int  ch_delta( )  { return delta_x; }
  34.       int  ch_width( )  { return width; }
  35.       int  ch_height( ) { return height; }
  36.       virtual void drawch( int x, int y, int clr );
  37. };
  38.  
  39. #endif
  40.