def is_point_over_marker(self, point): result = [] rect = point + point for i, marker in enumerate(self.markers): if not i == 4 and libgeom.is_bbox_in_rect(marker, rect): result.append(i) break return result
def is_point_over_marker(self, point): result = [] rect = point + point i = 0 for marker in self.markers: if not i == 4 and libgeom.is_bbox_in_rect(marker, rect): result.append(i) break i += 1 return result
def is_point_over_marker(self, point): result = [] rect = point + point i = 0 for marker in self.markers: if not i == 4 and is_bbox_in_rect(marker, rect): result.append(i) break i += 1 return result
def select_by_rect(self, rect, flag=False): result = [] layers = self.presenter.get_editable_layers() for layer in layers: for obj in layer.childs: if libgeom.is_bbox_in_rect(rect, obj.cache_bbox): result.append(obj) if flag: self.add(result) else: self.set(result)
def select_by_rect(self, rect, flag=False): result = [] model = self.presenter.model page = self.presenter.active_page layers = page.childs + model.childs[1].childs for layer in layers: for obj in layer.childs: if is_bbox_in_rect(rect, obj.cache_bbox): result.append(obj) if flag: self.add(result) else: self.set(result)
def _select_at_point(self, point): result = [] layers = self.presenter.get_editable_layers() layers.reverse() rect = point + point win_point = self.presenter.canvas.doc_to_win(point) trafo = self.presenter.canvas.trafo for layer in layers: if result: break objs = [] + layer.childs objs.reverse() for obj in objs: if is_bbox_in_rect(obj.cache_bbox, rect): ret = libcairo.is_point_in_path(win_point, trafo, obj, config.stroke_sensitive_size) if ret: result.append(obj) break return result