From: Antonio Ospite Date: Fri, 3 Oct 2014 10:57:27 +0000 (+0200) Subject: Fix the background of the pixel_buffer X-Git-Url: https://git.ao2.it/PoPiPaint.git/commitdiff_plain/0b1bf75a0d7dcb14ab1a03066f0fc633dda45507?ds=inline;hp=-c Fix the background of the pixel_buffer Initialize the pixel_buffer on creation to avoid having any "garbage" drawn as background. --- 0b1bf75a0d7dcb14ab1a03066f0fc633dda45507 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):