ultimatepp/uppdev/Draw/BackDraw.h
cxl 4053fc4a38 Developing Draw
git-svn-id: svn://ultimatepp.org/upp/trunk@1130 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2009-05-07 17:11:56 +00:00

32 lines
813 B
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& draw, int cx, int cy);
void Create(SystemDraw& draw, Size sz) { Create(draw, 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();
};