graphics/GraphicCommons.py
changeset 1741 dd94b9a68c61
parent 1740 b789b695b5c6
child 1742 92932cd370a4
equal deleted inserted replaced
1740:b789b695b5c6 1741:dd94b9a68c61
   188     pos = event.GetLogicalPosition(dc)
   188     pos = event.GetLogicalPosition(dc)
   189     if scaling:
   189     if scaling:
   190         pos.x = round(float(pos.x) / float(scaling[0])) * scaling[0]
   190         pos.x = round(float(pos.x) / float(scaling[0])) * scaling[0]
   191         pos.y = round(float(pos.y) / float(scaling[1])) * scaling[1]
   191         pos.y = round(float(pos.y) / float(scaling[1])) * scaling[1]
   192     return pos
   192     return pos
   193 
       
   194 
   193 
   195 
   194 
   196 def DirectionChoice(v_base, v_target, dir_target):
   195 def DirectionChoice(v_base, v_target, dir_target):
   197     """
   196     """
   198     Function that choose a direction during the wire points generation
   197     Function that choose a direction during the wire points generation