Fix the background of the pixel_buffer
authorAntonio Ospite <ao2@ao2.it>
Fri, 3 Oct 2014 10:57:27 +0000 (12:57 +0200)
committerAntonio Ospite <ao2@ao2.it>
Fri, 3 Oct 2014 10:59:36 +0000 (12:59 +0200)
Initialize the pixel_buffer on creation to avoid having any "garbage"
drawn as background.

CanvasView.py

index a33ee8d..e91902e 100755 (executable)
@@ -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):