Image.h

Go to the documentation of this file.
00001 
00011 #ifndef __IMAGE__H__
00012 #define __IMAGE__H__
00013 
00014 #include <wx/wx.h>
00015 #include <wx/dc.h>
00016 
00017 #include "../common.h"
00018 #include "../Direction.h"
00019 
00020 // A part of the GUI
00021 namespace GUI {
00022 
00026 class Image {
00027 public:
00031         Image() {}
00032 
00038         Image(string imageFile, wxBitmapType imageType = wxBITMAP_TYPE_BMP);
00039 
00043         ~Image() {}
00044 
00049         void Scale(int size);
00050 
00058         void Draw(wxCoord x, wxCoord y, wxDC & dc,const Direction & dir);
00059 
00064         const string & GetImageFileName() const {
00065                 return imageFileName;
00066         }
00067 
00071         void ChangeImage(const string & imageFile, wxBitmapType imageType = wxBITMAP_TYPE_BMP) {
00072                 LoadImage(imageFile, imageType);
00073         }
00074 
00078         const wxImage & GetLoadedImage() const {
00079                 return loadedImage;
00080         }
00081 
00082 private:
00084         string imageFileName;
00086         wxImage loadedImage;
00088         wxImage image;
00090         Direction direction;
00091 
00098         void CheckImageDirection(const Direction & dir);
00099 
00105         void LoadImage(const string & imageFile, wxBitmapType imageType);
00106 };
00107 
00108 } /* namespace GUI */
00109 
00110 #endif /* #ifndef __IMAGE__H__ */
00111 
00112 /* End of file Image.h */

Generated on Sun Apr 29 11:46:10 2007 for IPP/ICP2007 by  doxygen 1.4.7