00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #pragma once
00016 #include <background_wnd/detail/include.hpp>
00017
00018
00019 struct IPicture;
00020 namespace win32 { namespace gui {
00021
00022 namespace bg_wnd {
00023
00024 class ipicture
00025 {
00026 public:
00027 ipicture();
00028 ipicture(const ipicture& image);
00029 ~ipicture();
00030
00031 IPicture* raw_picture() const;
00032 const ipicture& operator= (const ipicture& image);
00033
00034
00035 bool get_size(SIZE& size) const;
00036 bool draw(HDC hDC, int x, int y, int cx, int cy, int xSrc, int ySrc, int cxSrc, int cySrc);
00037 bool draw(HDC hDC, int x, int y, int cx, int cy, int xSrc = 0, int ySrc = 0);
00038 bool draw(HDC hDC, int x, int y);
00039 bool draw(HDC hDC, POINT pt);
00040 bool draw_stretched(HDC hDC, const RECT& rc);
00041 bool loaded() const;
00042 bool load_from_file(const std::string& fileName);
00043 void release();
00044
00045 private:
00046 IPicture* pPicture_;
00047 };
00048
00049 }
00050 } }