/[enigma]/enigma/lib-src/oxydlib/Bitmap.h
ViewVC logotype

Diff of /enigma/lib-src/oxydlib/Bitmap.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dheck, Sun Jan 19 17:17:24 2003 UTC revision 1.2 by reallysoft, Wed Jun 25 19:31:59 2003 UTC
# Line 20  Line 20 
20  #define BITMAP_H  #define BITMAP_H
21    
22  #include "VecUtils.h"  #include "VecUtils.h"
 #include "OxydVersion.h"  
23  #include <string>  #include <string>
24    
25    namespace OxydLib {
26    
27    using std::string;
28    
29  class Palette  class Palette
30  {  {
31  public:  public:
# Line 33  public: Line 36  public:
36    void setNumColors(int numColors);    void setNumColors(int numColors);
37    
38    void getColor(int nColor,    void getColor(int nColor,
39                  unsigned int *pRed,                  unsigned int *pRed,
40                  unsigned int *pGreen,                  unsigned int *pGreen,
41                  unsigned int *pBlue) const;                  unsigned int *pBlue) const;
42    void setColor(int nColor,    void setColor(int nColor,
43                  unsigned int red,                  unsigned int red,
44                  unsigned int green,                  unsigned int green,
45                  unsigned int blue);                  unsigned int blue);
46    
47  private:  private:
48    std::vector<unsigned int> m_colors;    std::vector<unsigned int> m_colors;
# Line 71  private: Line 74  private:
74  // regardless of the bit depth of the bitmap.  // regardless of the bit depth of the bitmap.
75    
76  bool parseBitmap(const ByteVec &in,  bool parseBitmap(const ByteVec &in,
77                   OxydVersion ver,                   Bitmap *pBitmap,
78                   Bitmap *pBitmap,                   Palette *pPalette,
79                   Palette *pPalette,                   string *pMsg = 0);
                  std::string *pMsg = 0);  
80  bool unparseBitmap(const Bitmap &bitmap,  bool unparseBitmap(const Bitmap &bitmap,
81                     const Palette &palette,                     const Palette &palette,
82                     OxydVersion ver,                     ByteVec *pOut,
83                     ByteVec *pOut,                     string *pMsg = 0);
                    std::string *pMsg = 0);  
84    
85  // The palette passed to bitmapToPPM should have 2^(bit depth of bitmap)  // The palette passed to bitmapToPPM should have 2^(bit depth of bitmap)
86  // colors.  // colors.
87    
88  void bitmapToPPM(const Bitmap &bitmap,  void bitmapToPPM(const Bitmap &bitmap,
89                   const Palette &palette,                   const Palette &palette,
90                   ByteVec *pOut);                   ByteVec *pOut);
91  void bitPlaneToPPM(const Bitmap &bitmap,  void bitPlaneToPPM(const Bitmap &bitmap,
92                     int nBitPlane,                     int nBitPlane,
93                     ByteVec *pOut);                     ByteVec *pOut);
94    
95    }
96    
97  #endif  #endif

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26