示例#1
0
文件: canvas.py 项目: slyfrs/sk1-wx
 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)
示例#2
0
文件: canvas.py 项目: slyfrs/sk1-wx
 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)
示例#3
0
文件: canvas.py 项目: slyfrs/sk1-wx
 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)
示例#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)
示例#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)
示例#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)