Files
Work/gif/GIFBMP.HPP
2024-08-07 09:16:27 -04:00

47 lines
1.1 KiB
C++

#ifndef _GIF_GIFBITMAP_HPP_
#define _GIF_GIFBITMAP_HPP_
#ifndef _GIF_GIFDECODER_HPP_
#include <gif/gif.hpp>
#endif
#ifndef _COMMON_BITMAP_HPP_
#include <common/bitmap.hpp>
#endif
#ifndef _COMMON_PUREPALETTE_HPP_
#include <common/purepal.hpp>
#endif
class GIFBitmap : public Bitmap, private GIFDecoder
{
public:
GIFBitmap(void);
BOOL open(const String &strPathFileName);
virtual ~GIFBitmap();
private:
virtual void paletteHandler(const UCHAR FAR *lpPaletteData,USHORT numColors);
virtual void attributeHandler(USHORT imageWide,USHORT imageDeep,USHORT pixelSize);
virtual void backgroundHandler(USHORT backgroundColor);
virtual void imageHandler(void);
virtual void showHandler(USHORT imageWide,USHORT imageDeep,const UCHAR FAR *lpRowData,USHORT yLocation);
virtual void errorHandler(const char FAR *message);
PurePalette mGIFPalette;
String mPathFileName;
};
inline
GIFBitmap::GIFBitmap(void)
{
}
inline
BOOL GIFBitmap::open(const String &strPathFileName)
{
mPathFileName=strPathFileName;
return unpackImage((char*)(String&)strPathFileName);
}
inline
GIFBitmap::~GIFBitmap()
{
}
#endif