~ubuntu-branches/ubuntu/trusty/python-enable/trusty

« back to all changes in this revision

Viewing changes to enthought/kiva/backend_wx.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2010-10-17 23:10:41 UTC
  • mto: (1.2.1 upstream) (8.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20101017231041-rziowhgl7zhxra2i
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
        def __init__(self, parent, id = 01, size = wx.DefaultSize):
226
226
            # need to init self.memDC before calling BaseWxCanvas.__init__ 
227
227
            self.memDC = wx.MemoryDC()
228
 
            self.size = (size.GetWidth(), size.GetHeight())
 
228
            self._size = (size.GetWidth(), size.GetHeight())
229
229
            WidgetClass.__init__(self, parent, id, wx.Point(0, 0), size, 
230
230
                                 wx.SUNKEN_BORDER | wx.WANTS_CHARS | \
231
231
                                 wx.FULL_REPAINT_ON_RESIZE )
233
233
            return
234
234
        
235
235
        def _create_kiva_gc(self, size):
236
 
            self.size = size
 
236
            self._size = size
237
237
            self.bitmap = wx.EmptyBitmap(size[0], size[1])
238
238
            self.memDC.SelectObject(self.bitmap)
239
239
            gc = gc_for_dc(self.memDC)
244
244
        def blit(self, event):
245
245
            t1 = now()
246
246
            paintdc = wx.PaintDC(self)
247
 
            paintdc.Blit(0, 0, self.size[0], self.size[1],
 
247
            paintdc.Blit(0, 0, self._size[0], self._size[1],
248
248
                         self.memDC, 0, 0)
249
249
            t2 = now()
250
250
            self.blit_time = t2 - t1