Esempio n. 1
0
 def draw_rubberband(self, event, x0, y0, x1, y1):
     # XOR does not work on MacOS ...
     if wx.Platform != "__WXMAC__":
         NavToolbar.draw_rubberband(self, event, x0, y0, x1, y1)
     else:
         if self.background is not None:
             self.canvas.restore_region(self.background)
         c0, c1 = self.ax.transData.inverted().transform([[x0, y0], [x1, y1]])
         l, b = c0
         r, t = c1
         self.to_draw.set_bounds(l, b, r - l, t - b)
         self.ax.draw_artist(self.to_draw)
         self.canvas.blit(self.ax.bbox)