This repository was archived by the owner on Jun 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdrawpanel.h
More file actions
64 lines (46 loc) · 1.55 KB
/
Copy pathdrawpanel.h
File metadata and controls
64 lines (46 loc) · 1.55 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/////////////////////////////////////////////////////////////////////////////
// Name: drawpanel.h
// Description: ...
// Author: Alexey Orlov (https://github.com/m110h)
// Last modification: 18/08/2020
// Licence: MIT licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _DRAW_PANEL_H_
#define _DRAW_PANEL_H_
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <wx/dcbuffer.h>
#include <wx/dcgraph.h>
#include "entities.h"
class BasicDrawPanel : public wxPanel
{
public:
BasicDrawPanel(wxWindow* parent, wxWindowID id, const wxSize& size);
void onSize(wxSizeEvent& event);
void onPaint(wxPaintEvent & evt);
void mouseReleased(wxMouseEvent& event);
/*
void mouseMoved(wxMouseEvent& event) {}
void mouseDown(wxMouseEvent& event) {}
void mouseWheelMoved(wxMouseEvent& event) {}
void mouseReleased(wxMouseEvent& event) {}
void rightClick(wxMouseEvent& event) {}
void mouseLeftWindow(wxMouseEvent& event) {}
void keyPressed(wxKeyEvent& event) {}
void keyReleased(wxKeyEvent& event) {}
*/
void paintNow();
void SetWorld(ProtoPuddle::World* _world);
bool SwitchAntialiasingMode();
private:
void softwareRender(wxDC* dc);
private:
wxGraphicsRenderer* renderer {nullptr};
double xUserScale {1.f};
double yUserScale {1.f};
ProtoPuddle::World* world {nullptr};
bool antialiasingFlag {true};
};
#endif