Exemplo n.º 1
0
 def select_point_by_click(self, point):
     for item in self.points:
         ipoint = item.get_screen_point()
         bbox = libgeom.bbox_for_point(ipoint, config.point_sensitivity_size)
         if libgeom.is_point_in_bbox(point, bbox):
             return item
     return None
Exemplo n.º 2
0
 def is_pressed(self, win_point):
     wpoint = self.canvas.point_doc_to_win(self.get_point())
     bbox = libgeom.bbox_for_point(wpoint, config.point_sensitivity_size)
     return libgeom.is_point_in_bbox(win_point, bbox)
Exemplo n.º 3
0
	def is_pressed(self, win_point):
		wpoint = self.canvas.point_doc_to_win(self.get_point())
		bbox = libgeom.bbox_for_point(wpoint, config.point_sensitivity_size)
		return libgeom.is_point_in_bbox(win_point, bbox)
Exemplo n.º 4
0
 def is_pressed(self, win_point):
     wpoint = self.canvas.point_doc_to_win(self.point)
     if not len(wpoint) == 2: wpoint = wpoint[2]
     bbox = libgeom.bbox_for_point(wpoint, config.point_sensitivity_size)
     return libgeom.is_point_in_bbox(win_point, bbox)
Exemplo n.º 5
0
	def is_pressed(self, win_point):
		wpoint = self.canvas.point_doc_to_win(self.point)
		if not len(wpoint) == 2:wpoint = wpoint[2]
		bbox = libgeom.bbox_for_point(wpoint, config.point_sensitivity_size)
		return libgeom.is_point_in_bbox(win_point, bbox)