#if !defined RQCANVAS_H
#define RQCANVAS_H
#include <windows.h>
#include "rqcontrol.h"
#include "rqfont.h"
#include "rqdefs.h"
class RQBitmap;
class RQCanvas: public RQControl
{
private:
HBRUSH *hBrush;
HPEN *hPen;
HFONT *hFont;
RQFont *font;
int hBrushCount, hPenCount, hFontCount;
int hBrushMaxSize, hPenMaxSize, hFontMaxSize;
void checkPenCount();
void checkBrushCount();
void checkFontCount();
public:
RQCanvas();
~RQCanvas();
void setHDC(HDC);
void setFont(RQFont* font);
void textOut(int x, int y, char const*, int fg, int bg);
void line(int x1, int y1, int x2, int y2, int c);
void rectangle(int x1, int y1, int x2, int y2, int c);
void paint(int x, int y, int fillColor, int borderColor);
int getPixel(int x, int y);
void setPixel(int x, int y, int c);
void fillRect(int x1, int y1, int x2, int y2, int c);
void roundRect(int x1, int y1, int x2, int y2, int w, int h, int c);
void draw(int x, int y, RQBitmap& bitmap);
void drawText(char const *text, int x1, int y1, int x2, int y2, int flags, int c);
void freeResources();
};
#endif
|