00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #pragma once
00016 #include <background_wnd/painter_holder.hpp>
00017
00018
00019 namespace win32 { namespace gui {
00020
00021 class transparent_painter : public painter_base, public painter_holder
00022 {
00023 public:
00024 typedef COLORREF param0;
00025
00026
00027 transparent_painter(COLORREF crTransparent);
00028
00029
00030 transparent_painter* clone() const;
00031 void draw(HDC hDC, int cx, int cy);
00032
00033
00034 void transparent_color(COLORREF crTransparent);
00035 COLORREF transparent_color() const;
00036
00037 private:
00038
00039 #if (!defined WINVER || WINVER < 0x0500)
00040 HBITMAP prepare_mask(HBITMAP hSourceBmp, int cx, int cy);
00041 void draw_transparent_bitmap(HDC hDC, HDC hSourceDC, HBITMAP hMaskBmp, int cx, int cy);
00042 #endif // #ifndef WINVER || WINVER < 0x0500
00043
00044 COLORREF crTransparent_;
00045 };
00046
00047 } }