Пример #1
0
 def add_event_data(self, event, handle):
     gbl_pt = np.array([event.xdata, event.ydata])
     lcl_pt = inv_transform_poly(self.e.handles[handle].tfrm, gbl_pt)
     event.lcl_pt = lcl_pt
     if self.select_pt is not None:
         xdata, ydata = self.select_pt[1]
     else:
         xdata, ydata = 0., 0.
     dxdy = event.xdata - xdata, event.ydata - ydata
     event.dxdy = dxdy
Пример #2
0
 def add_event_data(tfrm, event):
     gbl_pt = np.array([event.xdata, event.ydata])
     lcl_pt = inv_transform_poly(tfrm, gbl_pt)
     event.lcl_pt = lcl_pt
Пример #3
0
 def add_event_data(shape, event, handle, info):
     gbl_pt = np.array([event.xdata, event.ydata])
     lcl_pt = inv_transform_poly(shape.tfrm, gbl_pt)
     event.lcl_pt = lcl_pt