IImage.hpp

Go to the documentation of this file.
00001 #ifndef __IImage__
00002 #define __IImage__
00003 
00004 #include <Basics/ICountedObject.hpp>
00005 #include <Basics/CSystemString.hpp>
00006 #include <MathTools/CDimension.hpp>
00007 #include <MathTools/CRect.hpp>
00008 
00009 //  ===========================================================================
00010 
00011 using Exponent::Basics::ICountedObject;
00012 using Exponent::Basics::CSystemString;
00013 using Exponent::MathTools::CDimension;
00014 using Exponent::MathTools::CRect;
00015 
00016 //  ===========================================================================
00017 
00018 namespace Exponent
00019 {
00020     namespace GUI
00021     {
00022         namespace Graphics
00023         {
00042             interface IImage : public ICountedObject
00043             {
00044             public:
00045 
00046 //  ===========================================================================
00047 
00052                 enum EImageFormats
00053                 {
00054                     e_bitmap = 0,   
00055                     e_targa,        
00056                     e_png,          
00057                     e_jpeg,         
00058                     e_tiff,         
00059                     e_imageIcon,    
00060                 };
00061 
00062 //  ===========================================================================
00063 
00067                 virtual ~IImage() {}
00068 
00069 //  ===========================================================================
00070 
00075                 virtual const CDimension &getImageSize() const = 0;
00076 
00081                 virtual const CRect &getNormalisedImageSize() const = 0;
00082 
00087                 virtual EImageFormats getImageFormat() const = 0;
00088 
00093                 virtual const CSystemString &getFileName() const = 0;
00094 
00095 //  ===========================================================================
00096 
00102                 virtual bool loadFromFile(const CSystemString &filename) = 0;
00103 
00107                 virtual void unloadImage() = 0;
00108 
00109 //  ===========================================================================
00110 
00115                 virtual bool imageHasAlpha() const = 0;
00116 
00121                 virtual bool hasImageLoaded() const = 0;
00122 
00123 //  ===========================================================================
00124 
00126                 #ifdef WIN32
00127 
00132                     virtual HBITMAP getImageHandle() const = 0;
00134                 #else
00135 
00140                     virtual CGImageRef getImageHandle() const = 0;
00142                 #endif
00143 
00144             };
00145         }
00146     }
00147 }
00148 #endif  // End of IImage.hpp

Infinity API - IImage.hpp Source File generated on 7 Mar 2007