inet/zz_image_font.h

Go to the documentation of this file.
00001 /* libzzinet
00002  *
00003  * This program is distributed under the GNU General Public License, version 2.
00004  * A copy of this license is included with this source.
00005  *
00006  * Copyright 2000-2006, Toni Thomsson <toni@tonjac.org> 
00007 */
00008 
00009 #ifndef zz_image_font_h
00010 #define zz_image_font_h
00011 
00012 #include <zz_export.h>
00013 
00014 extern "C"
00015 {
00016 #include <gd.h>
00017 }
00018 
00019 // Description: Textorientering
00020 typedef enum
00021 {
00022     ZZ_IMAGE_FONT_HORIZONTAL = 0,
00023     ZZ_IMAGE_FONT_VERTICAL = 1
00024 
00025 } ZZ_IMAGE_FONT_ORIENTATION;
00026 
00027 // Description: Fonter
00028 typedef enum
00029 {
00030     ZZ_IMAGE_FONT_TINY = 0,
00031     ZZ_IMAGE_FONT_SMALL = 1,
00032     ZZ_IMAGE_FONT_MEDIUM = 2,
00033     ZZ_IMAGE_FONT_LARGE = 3,
00034     ZZ_IMAGE_FONT_HUGE = 4
00035 
00036 } ZZ_IMAGE_FONT_TYPE;
00037 
00038 /*
00039         Description:
00040         GIF font
00041 
00042         Library:
00043         libgd.a libzzinet.a (HPUX) libgd.lib libzzinet.lib (win32)
00044 
00045         Platform:
00046     HPUX, win32
00047 
00048         Author:
00049         Toni Thomsson, toni@tonjac.org
00050 */
00051 class ZZ_API CzzImageFont
00052 {
00053 public:
00054         
00055         /*
00056                 Description:
00057                 Skapar en font
00058 
00059                 Remarks:
00060                 Skapar en font av en viss typ/storlek
00061         */
00062     CzzImageFont( const ZZ_IMAGE_FONT_TYPE& type        // IN, typ/storlek
00063                                  );
00064 
00065         /*
00066                 Remarks:
00067                 Kopieringskonstruktor
00068         */
00069     CzzImageFont( const CzzImageFont& obj );
00070 
00071         // Description: Destruktor
00072     virtual ~CzzImageFont();
00073 
00074     // Description: Vertikal text
00075     static ZZ_IMAGE_FONT_ORIENTATION vertical( void );
00076 
00077     // Description: Horisontell text
00078     static ZZ_IMAGE_FONT_ORIENTATION horizontal( void );
00079 
00080         // Description: Tilldelningsoperator
00081     const CzzImageFont& operator=( const CzzImageFont& obj );
00082 
00083         // Description: Font typ/storlek
00084     const ZZ_IMAGE_FONT_TYPE& getType( void ) const;
00085 
00086         // Description: Fontbredd    
00087     int getWidth( void ) const;
00088 
00089         // Description: Fonthöjd
00090     int getHeight( void ) const;
00091 
00092 protected:
00093 
00094         /*
00095                 Description:
00096                 Returnerar en pekare till angiven font
00097                                 
00098                 Remarks:
00099                 protected
00100         */
00101         gdFontPtr findFontPtr( void ) const;
00102 
00103 private:
00104     ZZ_IMAGE_FONT_TYPE m_Type;
00105 
00106 };
00107 
00108 #endif // zz_image_font_h
00109 
00110 
00111 

Generated on Thu Sep 21 21:45:42 2006 for tonjac.org MINI/C++ library by  doxygen 1.4.6-NO