From 0b1bf75a0d7dcb14ab1a03066f0fc633dda45507 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 3 Oct 2014 12:57:27 +0200 Subject: [PATCH] Fix the background of the pixel_buffer Initialize the pixel_buffer on creation to avoid having any "garbage" drawn as background. --- CanvasView.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CanvasView.py b/CanvasView.py index a33ee8d..e91902e 100755 --- a/CanvasView.py +++ b/CanvasView.py @@ -93,7 +93,7 @@ class CanvasView(wx.Window): # are bugs regarding bitmaps with alpha channels and MemoryDC self.grid_buffer = self.loadGrid("res/grid.png") - self.pixels_buffer = wx.EmptyBitmap(w, h, depth=32) + self.pixels_buffer = wx.EmptyBitmapRGBA(w, h, 0, 0 ,0, 255) self.drawAllPixels() def setPixelCoordinates(self, gc): -- 2.1.4