-
Notifications
You must be signed in to change notification settings - Fork 0
/
drawing.hxx
33 lines (30 loc) · 833 Bytes
/
drawing.hxx
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
#pragma once
#include <vector>
#include "window.hxx"
namespace escript
{
class Painter
{
public:
Painter(escript::Window &targetWindow);
std::vector<std::vector<escript::Color>> getMandelbrotSetPixels();
void drawPixels(std::vector<std::vector<escript::Color>> pixels);
void zoomIn();
void zoomOut();
void panRight();
void panLeft();
void panDown();
void panUp();
private:
double zoomLevel = 1.0;
double panValue = 0.25;
Window &targetWindow;
double complexHalfHeight;
double complexHalfWidth;
double horizontalOffset = 0;
double verticalOffset = 0;
double getStartingVerticalPosition();
double getStartingHorizontalPosition();
double getZoomFactor();
};
};