Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

font_bitmap.h

Go to the documentation of this file.
00001 /*
00002         $Id: font_bitmap.h,v 1.1 2001/03/06 15:09:20 mbn Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 
00014         File purpose:
00015                 Bitmap font support.
00016 */
00017 
00018 #ifndef header_font_bitmap
00019 #define header_font_bitmap
00020 
00021 #include "font_generic.h"
00022 
00023 class CL_Surface;
00024 class CL_Font_Description;
00025 class CL_Target;
00026 
00027 class CL_Font_Bitmap : public CL_Font_Generic
00028 {
00029 protected:
00030         CL_Surface *chars[256];
00031         int space_len;
00032         int subtract_width;
00033         int height;
00034 
00035 public:
00036         CL_Font_Bitmap(CL_Font_Description *font_desc);
00037 
00038         virtual ~CL_Font_Bitmap();
00039 
00040         virtual int get_height();
00041         virtual int get_text_width(const char *text);
00042         virtual int get_char_width(const char character);
00043         
00044         virtual void print_left(int x, int y, const char *text, int n_height=1);
00045         virtual void print_left(int x, int y, float scale_x, float scale_y, const char *text);
00046         virtual void print_center(int x, int y, const char *text);
00047         virtual void print_right(int x, int y, const char *text);
00048         
00049         virtual void put_target(int x, int y, const char *text, CL_Target *target, int alignment);
00050   virtual int change_size(int size) {return -1;}
00051   unsigned int change_colour(unsigned char r, unsigned char g, unsigned char b, unsigned char a) {return -1;}
00052 };
00053 
00054 #endif
00055 

Generated at Wed Apr 4 19:54:00 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001