Changeset 1721
- Timestamp:
- 07/24/07 11:03:30 (1 year ago)
- Files:
-
- gaphas/trunk/demo_profile.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphas/trunk/demo_profile.py
r1700 r1721 136 136 view.connect('hover-changed', handle_changed, 'hover') 137 137 view.connect('selection-changed', handle_changed, 'selection') 138 return view 138 139 139 140 def main(): … … 145 146 c=Canvas() 146 147 147 create_window(c, 'View created before')148 view = create_window(c, 'View created before') 148 149 149 150 # Add stuff to the canvas: … … 174 175 x = int(i % n) * 20 175 176 y = int(i / n) * 20 176 bb.matrix.translate( x, y)177 bb.matrix.translate(20 + x, y) 177 178 bb.matrix.rotate(math.pi/4.0 * i / 10.0) 178 179 c.add(bb, parent=b) 179 180 181 tool = view.tool._tools[1] 180 182 for i in range(40): 181 183 bb = MyBox() 182 bb.width = bb.height = 15183 x = int(i % 4) * 20184 y = int(i / 4) * 20185 bb.matrix.translate(20 + x , 100 + y)184 bb.width = bb.height = 20 185 x = int(i % 4) 186 y = int(i / 4) 187 bb.matrix.translate(20 + x * 30, 100 + y * 30) 186 188 c.add(bb) 189 190 if x > 0: 191 l = Line() 192 l.fyzzyness = 1 193 h1, h2 = l.handles() 194 h2.pos = (10, 0) 195 l.matrix.translate(10 + x * 30, 110 + y * 30) 196 c.add(l) 197 tool.connect(view, l, h1, 10 + x * 30, 110 + y * 30) 198 tool.connect(view, l, h2, 20 + x * 30, 110 + y * 30) 199 if y > 0: 200 l = Line() 201 l.fyzzyness = 1 202 h1, h2 = l.handles() 203 h2.pos = (0, -10) 204 l.matrix.translate(x * 30 + 30, 100 + y * 30) 205 c.add(l) 206 tool.connect(view, l, h1, x * 30 + 30, 100 + y * 30) 207 tool.connect(view, l, h2, x * 30 + 30, 90 + y * 30) 187 208 188 209 t=MyText('Single line')
