Beispiel #1
0
 def select_by_rect(self, start, end, flag=False):
     start = self.win_to_doc(start)
     end = self.win_to_doc(end)
     rect = start + end
     rect = normalize_bbox(rect)
     self.presenter.selection.select_by_rect(rect, flag)
Beispiel #2
0
 def bbox_doc_to_win(self, bbox):
     new_bbox = self.doc_to_win(bbox[:2]) + self.doc_to_win(bbox[2:])
     return normalize_bbox(new_bbox)
Beispiel #3
0
 def bbox_win_to_doc(self, bbox):
     new_bbox = self.win_to_doc(bbox[:2]) + self.win_to_doc(bbox[2:])
     return normalize_bbox(new_bbox)
Beispiel #4
0
 def select_by_rect(self, start, end, flag=False):
     start = self.win_to_doc(start)
     end = self.win_to_doc(end)
     rect = start + end
     rect = normalize_bbox(rect)
     self.presenter.selection.select_by_rect(rect, flag)
Beispiel #5
0
 def bbox_doc_to_win(self, bbox):
     new_bbox = self.doc_to_win(bbox[:2]) + self.doc_to_win(bbox[2:])
     return normalize_bbox(new_bbox)
Beispiel #6
0
 def bbox_win_to_doc(self, bbox):
     new_bbox = self.win_to_doc(bbox[:2]) + self.win_to_doc(bbox[2:])
     return normalize_bbox(new_bbox)