ultimatepp/uppdev/Draw/BackDraw.h
cxl d6c6118a16 Developing Draw
git-svn-id: svn://ultimatepp.org/upp/trunk@1146 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-05-07 21:52:17 +00:00

39 lines
1.1 KiB
C++

class BackDraw : public SystemDraw {
public:
virtual bool IsPaintingOp(const Rect& r) const;
protected:
#ifdef PLATFORM_WIN32
HBITMAP hbmpold;
HBITMAP hbmp;
#endif
#ifdef PLATFORM_X11
Pixmap pixmap;
#endif
Size size;
Draw *painting;
Point painting_offset;
public:
void Put(SystemDraw& w, int x, int y);
void Put(SystemDraw& w, Point p) { Put(w, p.x, p.y); }
void Create(SystemDraw& w, int cx, int cy);
void Create(SystemDraw& w, Size sz) { Create(w, sz.cx, sz.cy); }
void Create(int cx, int cy);
void Create(Size sz) { Create(sz.cx, sz.cy); }
void Destroy();
void SetPaintingDraw(Draw& w, Point off) { painting = &w; painting_offset = off; }
BackDraw();
~BackDraw();
// Deprecated:
void Put(Draw& w, int x, int y) { Put(*(SystemDraw*)&w, x, y); }
void Put(Draw& w, Point p) { Put(*(SystemDraw*)&w, p.x, p.y); }
void Create(Draw& w, int cx, int cy) { Create(*(SystemDraw*)&w, cx, cy); }
void Create(Draw& w, Size sz) { Create(*(SystemDraw*)&w, sz.cx, sz.cy); }
};