Files
Work/meshwrp/image.hpp
2024-08-07 09:16:27 -04:00

40 lines
999 B
C++

#ifndef _MESHWRP_IMAGE_HPP_
#define _MESHWRP_IMAGE_HPP_
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
#ifndef _COMMON_GUIWINDOW_HPP_
#include <common/guiwnd.hpp>
#endif
#ifndef _COMMON_GUIWINDOW_HPP_
#include <common/guiwnd.hpp>
#endif
#ifndef _JPGIMG_DIB24_HPP_
#include <jpgimg/dib24.hpp>
#endif
class Image : public DIB24
{
public:
Image(void);
virtual ~Image();
Image &operator=(const Image &image);
bool open(String strPathFileName,GUIWindow &window);
bool newImage(LONG width,LONG height,GUIWindow &window);
bool display(GUIWindow &window,const Rect &dstRect,const Point &srcPoint);
bool display(GUIWindow &window);
private:
bool handleOpenGIF(const String &strPathFileName,PureDevice &pureDevice);
bool handleOpenJPG(const String &strPathFileName,PureDevice &pureDevice);
bool handleOpenBMP(const String &strPathFileName,PureDevice &pureDevice);
};
inline
Image &Image::operator=(const Image &image)
{
(DIB24&)*this=(DIB24&)image;
return *this;
}
#endif