Changeset 994
- Timestamp:
- 07/11/07 03:51:29 (6 years ago)
- Files:
-
- 1 modified
-
branch/joao/umitMapper/RadialNet.py (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branch/joao/umitMapper/RadialNet.py
r988 r994 43 43 self.__numberOfRings = numberOfRings 44 44 """Number of rings in radial layout""" 45 self.__ringGap = 4545 self.__ringGap = 20 46 46 """Gap between rings""" 47 47 self.__graph = None … … 57 57 self.__animationRate = 1000 / 60 # 60Hz 58 58 """""" 59 self.__paused = False 60 """""" 59 self.__ringFactor = [1] * self.__numberOfRings 60 self.__ringFactor[0] = 4 61 self.__ringFactor[1] = 3 62 self.__ringFactor[2] = 2 63 61 64 62 65 super(RadialNet, self).__init__() … … 132 135 """ 133 136 """ 134 if self.__paused == True: 135 self.__paused = False 136 137 if self.__paused == False: 138 self.__paused = True 137 key = gdk.keyval_name(event.keyval) 138 139 if key == "KP_Multiply": 140 141 print "hello" 142 143 self.queue_draw() 139 144 140 145 return True … … 304 309 (xc, yc) = self.__centerOfWidget 305 310 311 radius = 0 312 306 313 # Drawing network rings 307 for i in range(self.__numberOfRings, 0, -1): 308 309 self.context.arc(xc, yc, self.__ringGap * i, 0, 2 * math.pi) 310 self.context.set_source_rgb(0.2, 0.2, 0.2) 314 for i in range(0, self.__numberOfRings): 315 316 radius += self.__ringGap * self.__ringFactor[i] 317 318 self.context.arc(xc, yc, radius, 0, 2 * math.pi) 319 self.context.set_source_rgb(0.0, 0.0, 0.0) 311 320 self.context.set_dash([4, 6]) 312 321 self.context.set_line_width(0.2) … … 397 406 oldNodes = [] 398 407 408 radius = 0 409 399 410 # For each ring in visualization 400 411 for i in range(self.__numberOfRings): … … 403 414 404 415 localNodes = [] 416 417 radius += self.__ringGap * self.__ringFactor[i] 405 418 406 419 # For each new node … … 428 441 (min, max) = self.__angleRange[node.getID()] 429 442 alpha = 0 430 431 radius = self.__ringGap * (i + 1)432 443 433 444 # Calculating nodes posintions
