fs/ras/fsRle8Enc.h

Go to the documentation of this file.
00001 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
00002 /*                          _______      ______    ______          __      */
00003 /*  ~ ~ ~ ~ ~ ~ ~ ~ ~ ~    / ____(_)___ / ___ /)  / ____/___  ____/ /__    */
00004 /*     [fsRle8Enc]        / /_  / / __ \\__ \|/  / /   / __ \/ __  / _ \   */
00005 /*       rev. 6          / __/ / / /_/ /__/ /   / /___/ /_/ / /_/ /  __/   */
00006 /*    6th Feb 2007      /_/   /_/ ,___/____/    \____/\____/\__,_/\___/    */
00007 /*     [x] stable              /_/ (c) 2006-7 Filip STOKLAS (FipS)         */
00008 /*  ~ ~ ~ ~ ~ ~ ~ ~ ~ ~       http://HOLE.4FipS.com/fips_code.php          */
00009 /*                                                                         */
00010 /* This code is free for personal and commercial use. You may redistribute */
00011 /* it by any means. If you use the code for your own projects please give  */
00012 /* me credit. Please send a bug report. Don't alter or remove this header! */
00013 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
00014 #ifndef FS_RAS_FSRLE8ENC_H
00015 #define FS_RAS_FSRLE8ENC_H
00016 //---------------------------------------------------------------------------
00017 #if defined(FS_INCLUDE_USERDEFS) // inject user definition file on request
00018 #   include <fs/fsUserDefs.h>
00019 #endif 
00020 //---------------------------------------------------------------------------
00021 namespace fs { namespace ras {
00022 //---------------------------------------------------------------------------
00024 
00036 class Rle8Enc_t
00037 {
00038  public:
00039 
00040     typedef unsigned int uint32;
00041     struct PxFmt8888_t 
00042     {
00043         unsigned char r, g, b, a;
00044         bool operator == (const PxFmt8888_t &RHS)
00045         { return r == RHS.r && g == RHS.g && b == RHS.b && a == RHS.a; }
00046     };
00047 
00049     Rle8Enc_t(const PxFmt8888_t *pSrc, int nW, int nH);
00051     ~Rle8Enc_t();
00053     bool IsValid() const;
00054 
00056     bool GetSize(int &nW, int &nH) const;
00058     bool GetRle(const unsigned char *&pRle, int &nNum) const;
00060     bool GetPal(const PxFmt8888_t *&pPal, int &nNum) const;
00062     bool GetOff(const uint32 *&pOff, int &nNum) const;
00063 
00064  private:
00065  
00066     Rle8Enc_t(); 
00067     Rle8Enc_t(const Rle8Enc_t &); 
00068     Rle8Enc_t & operator = (const Rle8Enc_t &); 
00069  
00070     void *m_pImpl; 
00071 };
00072 //---------------------------------------------------------------------------
00073 }} // namespace fs::ras
00074 //---------------------------------------------------------------------------
00075 #endif // FS_RAS_FSRLE8ENC_H

FipS' Code (Thu Feb 15 22:43:35 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]