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

font_generic.h

Go to the documentation of this file.
00001 /*
00002         $Id: font_generic.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                 Generic font support.
00016 */
00017 
00018 #ifndef header_font_generic
00019 #define header_font_generic
00020 
00021 class CL_Target;
00022 class CL_Resource;
00023 
00024 class CL_Font_Generic
00025 {
00026 public:
00027         CL_Font_Generic();
00028 
00029         virtual ~CL_Font_Generic();
00030 
00031         int add_reference();
00032         int release_reference();
00033 
00034         virtual int get_height() = 0;
00035         virtual int get_text_width(const char *text) = 0;
00036         virtual int get_char_width(const char character) = 0;
00037         
00038         virtual void print_left(int x, int y, const char *text, int n_height=1) = 0;
00039         virtual void print_left(int x, int y, float scale_x, float scale_y, const char *text) = 0;
00040         virtual void print_center(int x, int y, const char *text) = 0;
00041         virtual void print_right(int x, int y, const char *text) = 0;
00042         
00043         virtual void put_target(int x, int y, const char *text, CL_Target *target, int alignment) = 0;
00044   virtual int change_size(int size) = 0;
00045 
00046   virtual unsigned int change_colour(unsigned char r, unsigned char g, unsigned char b, unsigned char a) = 0;
00047 
00048 private:
00049         int ref_count;
00050         CL_Resource *resource;
00051 };
00052 
00053 #endif
00054 

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