Changeset 1651
- Timestamp:
- 07/17/07 11:59:00 (1 year ago)
- Files:
-
- gaphas/branches/hw/gaphas/canvas.py (modified) (1 diff)
- gaphas/branches/hw/gaphas/examples.py (modified) (2 diffs)
- gaphas/branches/hw/gaphas/tests/test_canvas.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphas/branches/hw/gaphas/canvas.py
r1650 r1651 74 74 self._cache = WeakKeyDictionary() 75 75 76 self.proj = CanvasProjector(self)76 self.projector = CanvasProjector(self) 77 77 78 78 self._canvas_constraints = {} gaphas/branches/hw/gaphas/examples.py
r1650 r1651 238 238 } 239 239 240 view.canvas.proj (lc, xy=pdata)241 view.canvas.proj (lc, xy=pdata, f=lc.update_ratio)240 view.canvas.projector(lc, xy=pdata) 241 view.canvas.projector(lc, xy=pdata, f=lc.update_ratio) 242 242 lc.update_ratio() 243 243 view.canvas.add_canvas_constraint(item, handle, lc) … … 262 262 } 263 263 264 view.canvas.proj (lc, xy=pdata)265 view.canvas.proj (lc, xy=pdata, f=lc.update_ratio)264 view.canvas.projector(lc, xy=pdata) 265 view.canvas.projector(lc, xy=pdata, f=lc.update_ratio) 266 266 lc.update_ratio() 267 267 view.canvas.add_canvas_constraint(item, handle, lc) gaphas/branches/hw/gaphas/tests/test_canvas.py
r1650 r1651 30 30 31 31 bc = BalanceConstraint(band=(h_sw.x, h_se.x), v=h2.x, balance=0.25) 32 canvas.proj (bc, x={h_sw.x: box, h_se.x: box, h2.x: line})32 canvas.projector(bc, x={h_sw.x: box, h_se.x: box, h2.x: line}) 33 33 canvas._solver.add_constraint(bc) 34 34 35 35 eq = EqualsConstraint(a=h_se.y, b=h2.y) 36 canvas.proj (eq, y={h_se.y: box, h2.y: line})36 canvas.projector(eq, y={h_se.y: box, h2.y: line}) 37 37 canvas._solver.add_constraint(eq) 38 38
