-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimpleDraw.h
37 lines (34 loc) · 1.18 KB
/
SimpleDraw.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
33
34
35
36
// Simple drawing functions for educational purposes (h+cpp version)
// Assembled and coded by FST
#pragma once
#include <windows.h>
#include <iostream>
#include <string.h>
#include <tchar.h>
void usePen(int style = PS_SOLID, int width = 1, COLORREF color = RGB(0, 0, 0));
void useBrush(int style = 0, COLORREF color = RGB(255, 255, 255));
void _STARTPAINT();
void _ENDPAINT();
static std::wstring charToWString(const char* text);
void drawLine(int x1, int y1, int x2, int y2);
void drawText(int x, int y, const char *text);
void drawRectangle(int x1, int y1, int x2, int y2);
void drawSquare(int x, int y, int a);
void drawEllipse(int x, int y, int rx, int ry);
void drawCircle(int x, int y, int r);
void drawArc(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
void drawPolygon(int points[][2], int n);
void drawPolyline(int points[][2], int n);
void setWindowSize(int w, int h);
struct thread_data {
int m_id;
thread_data(int id) : m_id(id) {}
};
long __stdcall WindowProcedure( HWND window, unsigned int msg, WPARAM wp, LPARAM lp );
int getMouseX();
int getMouseY();
int getMouseButton();
int getKey();
int getKey(int k);
DWORD WINAPI openWindow(LPVOID lpParameter);
void initialize();