-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDraw.h
33 lines (31 loc) · 979 Bytes
/
Draw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include "Map.h"
using namespace std;
class Draw
{
private:
PAINTSTRUCT ps;
HWND _window;
HDC _hdc;
HDC _tempDc; // for temp buffer
HBITMAP _hBit; //
int _windowWidth, _windowHeight;
static long long updateCounter; //be on the safe side for window updating
public:
explicit Draw(int windowWidth, int windowHeight);
//explicit Draw(HWND& window, int windowWidth, int windowHeight);
Draw& rectangle(COORD leftTopCoord, COORD rightBotCoord, COLORREF color);
Draw& ellipse(COORD leftTopCoord, COORD rightBotCoord, COLORREF color);
Draw& text(string writing, COORD leftTopCoord, int fontHeight, int fontWidth, string fontType,
COLORREF color, COLORREF backColor);
Draw& image(const COORD& coord, const WCHAR*adress);
Draw& textTransparence(bool background);
HDC getHdc();
HWND* getHWND();
void setHdc(HDC hdc);
void showPicture();
void setWindow(HWND window);
void setWinWidth(int width);
void setWinHeight(int height);
~Draw();
};