ultimatepp/uppdev/MDraw/MDraw.h
cxl 4a1c627474 Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

55 lines
973 B
C++

#ifndef _MDraw_MDraw_h
#define _MDraw_MDraw_h
#include <CtrlLib/CtrlLib.h>
class PixelBlock {
enum {
RGBX = 1, RGB, RGB565, BGR565, RGB555, BGR555, PALETTE8
};
static int display;
Buffer<dword> buffer;
dword *pixel;
Size size;
#ifdef PLATFORM_WIN32
HBITMAP hbmp;
#endif
void Create0(int cx, int cy, bool section = true);
public:
static void Init();
Size GetSize() { return size; }
void Create(int cx, int cy);
void Clear();
void Put(Draw& w, int x, int y);
operator dword*() { return pixel; }
int LineDelta();
dword *PointAdr(int x, int y);
void DrawRect(int x, int y, int cx, int cy, Color c);
PixelBlock();
PixelBlock(int cx, int cy, bool section);
~PixelBlock();
};
class MDraw : public TopWindow {
public:
int pos;
virtual void Paint(Draw& w);
typedef MDraw CLASSNAME;
MDraw() { pos = 0; }
};
#endif