Changeset e8c96f5 in sasview for guiframe/local_perspectives/plotting/Edge.py
- Timestamp:
- Dec 15, 2008 7:07:21 PM (16 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- cd84dca
- Parents:
- d250f7d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/Edge.py
rb98db8c re8c96f5 64 64 65 65 66 def get_ radius(self):66 def get_angle(self): 67 67 return self.theta 68 68 69 def update(self,r1=None, r2=None, theta _right=None, theta_left=None):69 def update(self,r1=None, r2=None, theta=None): 70 70 """ 71 71 Draw the new roughness on the graph. … … 75 75 if r2!=None: 76 76 self.r2=r2 77 """ 78 self.theta_left=theta_left 79 self.theta_right=theta_right 80 if r1 !=None: 81 self.r1=r1 82 if r2!=None: 83 self.r2=r2 84 if theta_right!=None: 85 if theta_right < self.theta: 86 self.move_stop=True 87 else: 88 self.move_stop=False 89 if theta_left !=None: 90 if theta_left > self.theta: 91 self.move_stop=True 92 else: 93 self.move_stop=False 94 if theta_left ==None and theta_right==None: 95 self.move_stop=True 96 """ 97 #print "in the edge theta_right theta_left",theta_right,theta_left,self.theta 77 if theta !=None: 78 self.theta= theta 79 80 print "in the edge r1, r2",self.r1,self.r2,math.degrees(self.theta) 98 81 x1= self.r1*math.cos(self.theta) 99 82 y1= self.r1*math.sin(self.theta) … … 109 92 can restore on Esc. 110 93 """ 111 self.save_theta= self.theta 94 self.save_theta= math.atan2(ev.y,ev.x) 95 #self.save_theta= self.theta 112 96 self.base.freeze_axes() 113 97 … … 126 110 Process move to a new position, making sure that the move is allowed. 127 111 """ 128 #print "on move theta left , theta right",self.theta_left,self.theta_right 129 theta= math.atan2(y,x) 130 """print "on move theta left , theta right",self.theta_left,self.theta_right,theta 131 if self.theta_left !=None: 132 if self.theta_left >= theta: 133 print "went hier" 134 self.move_stop= True 135 if self.theta_right !=None: 136 if self.theta_right <= theta: 137 self.move_stop= True 138 139 self.move_stop= True 140 if self.move_stop: 141 """ 112 142 113 self.theta= math.atan2(y,x) 143 114 self.has_move= True … … 145 116 self.base.base.update() 146 117 147 def set_cursor(self, x, y): 148 self.move(x, y, None) 118 def set_cursor(self,r_min, r_max, theta): 119 self.theta= theta 120 self.r1= r_min 121 self.r2=r_max 149 122 self.update() 150 123 … … 154 127 params["radius1"] = self.r1 155 128 params["radius2"] = self.r2 129 params["theta"] = self.theta 156 130 return params 157 131 158 132 def set_params(self, params): 133 print "when here set curcor arc" 159 134 160 135 x1 = params["radius1"] 161 136 x2 = params["radius2"] 162 self.set_cursor(x, self._inner_mouse_y) 137 theta= params["theta"] 138 self.set_cursor(x1, x2, theta) 163 139 164 140
Note: See TracChangeset
for help on using the changeset viewer.