00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef zz_image_gif_h
00010 #define zz_image_gif_h
00011
00012 #include <zz_export.h>
00013
00014 #ifdef _WIN32
00015 extern "C"
00016 {
00017 #include <gd.h>
00018 }
00019 #else
00020 #include <gd.h>
00021 #endif
00022
00023 #include "zz_image_color.h"
00024 #include "zz_image_font.h"
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 class ZZ_API CzzImageGif
00043 {
00044 public:
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 CzzImageGif( int width,
00058 int height,
00059 const CzzImageColor& bg_color
00060 );
00061
00062
00063
00064
00065 CzzImageGif( const char* file
00066 );
00067
00068
00069
00070
00071
00072 CzzImageGif( const CzzImageGif& obj );
00073
00074
00075 virtual ~CzzImageGif();
00076
00077
00078
00079
00080
00081
00082
00083
00084 void drawText( int x,
00085 int y,
00086 const CzzImageFont& font,
00087 const ZZ_IMAGE_FONT_ORIENTATION& o,
00088 const CzzImageColor& color,
00089 const char* text
00090 );
00091
00092
00093
00094
00095
00096
00097
00098
00099 void dump( const char* file
00100 ) const;
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 void paste( int x,
00114 int y,
00115 int width,
00116 int height,
00117 const CzzImageGif& image
00118 );
00119
00120
00121 int getWidth( void ) const;
00122
00123
00124 int getHeight( void ) const;
00125
00126
00127 const CzzImageColor& getBackgroundColor( void ) const;
00128
00129
00130
00131
00132
00133 const CzzImageGif& operator=( const CzzImageGif& obj
00134 );
00135
00136 protected:
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146 int findColor( const CzzImageColor& color );
00147
00148
00149
00150
00151
00152
00153
00154
00155 gdFontPtr findFontPtr( const CzzImageFont& font );
00156
00157 private:
00158
00159 gdImagePtr m_Image;
00160 };
00161
00162 #endif // zz_image_gif_h
00163
00164
00165