aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab')
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.cpp9
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.hpp2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.cpp b/src/game_tab/left_panel/board/BoardCanvas.cpp
index fec281e..476b3aa 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.cpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.cpp
@@ -14,6 +14,7 @@ BoardCanvas::BoardCanvas(wxFrame *parent)
ApplyPreferences();
// The following should be called when using an EVT_PAINT handler
SetBackgroundStyle(wxBG_STYLE_PAINT);
+ //buffer=new wxBitmap(500,500,32);
}
BoardCanvas::~BoardCanvas() {
@@ -44,6 +45,14 @@ void BoardCanvas::OnPaint(wxPaintEvent &event) {
if (boardY > canvas_size.y)
boardY = 0;
DrawBoard(dc);
+
+ // TODO: Make DrawBoard() drawing into wxMemoryDC!
+ /*wxMemoryDC dc2(*buffer);
+ dc2.SetBackgroundMode(wxTRANSPARENT);
+ dc2.SetPen(wxPen(*wxBLACK, 3));
+ dc2.DrawRectangle(10,10,100,100);
+ dc.Blit(0, 0, 500,500, (wxDC*)&dc2,0,0);*/
+
}
void BoardCanvas::ApplyPreferences() {
diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp
index 7645414..4a610aa 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.hpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.hpp
@@ -52,6 +52,8 @@ class BoardCanvas : public wxPanel {
ClockTime black_time, white_time;
bool frozen,lock_square_size;
+ wxBitmap *buffer;
+
public:
BoardCanvas(wxFrame *parent);
BoardCanvas(wxFrame *parent,std::uint32_t square_width, bool frozen);