include/df/font.hpp

00001 /*
00002 
00003 Font class  (*.FNT)
00004 
00005 */
00006 
00007 class Font : virtual public SystemCode {
00008   _PROTECTED_:
00009     //private data
00010     uint32 clr;
00011     uint32 keyclr;  //transparent color
00012     uint8 bpp, bypp;
00013     union {
00014       PTR buf;
00015       uint8 *buf8;
00016     };
00017     uint32 charsiz;
00018     //private members
00019     void wnd_print_flg0(Window *gfx, int32 x, int32 y, char *c, BOOL vert = FALSE);
00020     void wnd_print_flg0KC(Window *gfx, int32 x, int32 y, char *c, BOOL vert = FALSE);
00021     void wnd_print_flg2(Window *gfx, int32 x, int32 y, char *c, BOOL vert = FALSE);
00022     void (Font::*_wnd_Print)(Window *gfx, int32 x, int32 y, char *c, BOOL vert);
00023     void bm_print_flg0(Bitmap *gfx, int32 x, int32 y, char *c, BOOL vert = FALSE);
00024     void bm_print_flg0KC(Bitmap *gfx, int32 x, int32 y, char *c, BOOL vert = FALSE);
00025     void bm_print_flg2(Bitmap *gfx, int32 x, int32 y, char *c, BOOL vert = FALSE);
00026     void (Font::*_bm_Print)(Bitmap *gfx, int32 x, int32 y, char *c, BOOL vert);
00027   public:
00028     //public members
00029     Font();  //constructor
00030     ~Font() {UnLoad();}
00031     //user public members
00032     int32 x, y;  //Share this info (so I don't create massive friend lists)
00033     int32 x_1, y_1;  //x-1,y-1
00034     int TabSpaces;  //1-8 (default=2)
00035     BOOL Valid;
00036     BOOL Load(File *);  //Load font
00037     BOOL Load(char *);  //Load font
00038     void UnLoad();
00039     void Print(Element *gfx, int32 x, int32 y, char *c, BOOL vert = FALSE);
00040     void PrintChar(Element *gfx, int32 x, int32 y, char c, BOOL vert = FALSE);
00041     void SetClr(uint32 _clr) {clr = _clr;}
00042     uint32 GetClr() { return clr;}
00043 };

Generated on Mon Mar 5 09:49:14 2007 for DigiForce by  doxygen 1.4.7