* compatibility with wxWdigets 2.9+: SetClippingRegion -> SetDeviceClippingRegion

* overload wxEVT_ERASE_BACKGROUND, to reduce flicker

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1555 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-12-07 21:43:55 +00:00
parent 525af32c85
commit b99f2dc700
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -88,7 +88,7 @@ void CardViewer::onPaint(wxPaintEvent&) {
// dc.SetDeviceOrigin(-dx, -dy);
wxRegion clip = GetUpdateRegion();
// clip.Offset(dx, dy);
dc.SetClippingRegion(clip);
dc.SetDeviceClippingRegion(clip);
// draw
if (!up_to_date) {
up_to_date = true;
@@ -150,4 +150,5 @@ Rotation CardViewer::getRotation() const {
BEGIN_EVENT_TABLE(CardViewer, wxControl)
EVT_PAINT (CardViewer::onPaint)
EVT_ERASE_BACKGROUND(CardViewer::onEraseBackground)
END_EVENT_TABLE ()