# along with this program. If not, see <http://www.gnu.org/licenses/>.
import wx
-from wx.lib.pubsub import Publisher as pub
+from wx.lib.pubsub import setuparg1
+from wx.lib.pubsub import pub
from wx.lib.wordwrap import wordwrap
import CanvasModel
import sys
from array import array
import wx
-from wx.lib.pubsub import Publisher as pub
+from wx.lib.pubsub import setuparg1
+from wx.lib.pubsub import pub
class Canvas:
self.offset_angle = -pi/2.
- self.SetSize((w, h))
+ self.SetInitialSize((w, h))
self.SetFocus()
# 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):
import CanvasFrame
-class PoPiPaApp(wx.PySimpleApp):
+class PoPiPaApp(wx.App):
def __init__(self, *args, **kwargs):
self.base_image = kwargs.pop('base_image', None)
- wx.PySimpleApp.__init__(self, *args, **kwargs)
+ wx.App.__init__(self, *args, **kwargs)
def OnInit(self):
# We do not want a resizeable frame!