-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plotter.h
41 lines (31 loc) · 861 Bytes
/
Plotter.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
37
38
39
40
41
#ifndef _PLOTTER
#define _PLOTTER
#include <windows.h>
#include "Matrix.h"
const char SQUARE = -79;
#ifndef _INK_COLOR_
#define _INK_COLOR_
enum ink
{
black = 0x00, darkblue = 0x01, darkgreen = 0x02, darkcyan = 0x03,
darkred = 0x04, purple = 0x05, darkyellow = 0x06, lightgrey = 0x07,
grey = 0x08, blue = 0x09, green = 0x0A, cyan = 0x0B,
red = 0x0C, magenta = 0x0D, yellow = 0x0E, white = 0x0F
};
#endif
class Plotter
{
protected:
COORD coordScreen;
HANDLE hConsoleOutput;
char dummy;
void cls( HANDLE hConsole );
int startX;
int startY;
public:
Plotter(int x = 0, int y = 0);
void clear();
void setStartPoint(int x,int y);
void draw(const Matrix&);
};
#endif