- Timestamp:
- 08/15/09 19:00:32 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/alma/python/asaplotbase.py
r1614 r1620 298 298 299 299 def region_start(event): 300 height = self.canvas.figure.bbox.height() 301 self.rect = {'fig': None, 'height': height, 302 'x': event.x, 'y': height - event.y, 300 self.rect = {'x': event.x, 'y': event.y, 303 301 'world': [event.xdata, event.ydata, 304 302 event.xdata, event.ydata]} … … 308 306 309 307 def region_draw(event): 310 self.canvas._tkcanvas.delete(self.rect['fig']) 311 self.rect['fig'] = self.canvas._tkcanvas.create_rectangle( 312 self.rect['x'], self.rect['y'], 313 event.x, self.rect['height'] - event.y) 314 308 self.figmgr.toolbar.draw_rubberband(event, event.x, event.y, 309 self.rect['x'], self.rect['y']) 310 315 311 def region_disable(event): 316 312 self.register('motion_notify', None) 317 313 self.register('button_release', None) 318 319 self.canvas._tkcanvas.delete(self.rect['fig'])320 314 321 315 self.rect['world'][2:4] = [event.xdata, event.ydata] … … 323 317 self.rect['world'][1], self.rect['world'][2], 324 318 self.rect['world'][3]) 319 self.figmgr.toolbar.release(event) 325 320 326 321 self.register('button_press', region_start)
Note:
See TracChangeset
for help on using the changeset viewer.