Ramming chart is now drawn with double-buffering

This commit is contained in:
Lukas Matena 2018-04-09 14:49:32 +02:00
parent 9ebff9ce00
commit bbbb5c9a93
2 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,6 @@
#include <algorithm>
#include <wx/dcbuffer.h>
#include "RammingChart.hpp"
@ -11,7 +13,8 @@
wxDEFINE_EVENT(EVT_WIPE_TOWER_CHART_CHANGED, wxCommandEvent);
void Chart::draw(wxDC& dc) {
void Chart::draw() {
wxAutoBufferedPaintDC dc(this); // unbuffered DC caused flickering on win
dc.SetPen(*wxBLACK_PEN);
dc.SetBrush(*wxWHITE_BRUSH);
dc.DrawRectangle(m_rect);