Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# ipicture.hpp

    00001 // ipicture.hpp
    00002
    00003 // Copyright (C) 2004 Steven Weiß (steven11@gmx.de)
    00004 //
    00005 // Permission to copy, use, sell and distribute this software is granted
    00006 // provided this copyright notice appears in all copies.
    00007 // Permission to modify the code and to distribute modified code is granted
    00008 // provided this copyright notice appears in all copies, and a notice
    00009 // that the code was modified is included with the copyright notice.
    00010 //
    00011 // This software is provided "as is" without express or implied warranty,
    00012 // and with no claim as to its suitability for any purpose.
    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     // operations
    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 }    // namespace bg_wnd
    00050 } }  // namespace win32::gui

| by Steven Weiss. You can contact me at steven11@gmx.de.