Changeset 1557

Show
Ignore:
Timestamp:
07/02/07 12:40:43 (1 year ago)
Author:
wrobe..@pld-linux.org
Message:

- move items only by matrix translation before adding them to canvas as in

demo.py on trunk

- code cleanup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphas/branches/hw/demo.py

    r1555 r1557  
    296296 
    297297    b=MyBox() 
    298     h = b.handles()[0] 
    299     h.x = 20 
    300     h.y = 20 
    301298    b.min_width = 20 
    302299    b.min_height = 30 
     
    306303 
    307304    fl = FatLine() 
    308     h1, h2 = fl.handles() 
    309     h1.x = 100 
    310     h1.y = 100 
    311305    fl.height = 50 
    312306    fl.matrix.translate(100, 100) 
     
    316310    circle = Circle() 
    317311    h1, h2 = circle.handles() 
    318     h1.x = 50 
    319     h1.y = 100 
    320312    circle.radius = 20 
    321313    circle.matrix.translate(50, 100) 
  • gaphas/branches/hw/gaphas/examples.py

    r1554 r1557  
    9090    def _set_height(self, height): 
    9191        h1, h2 = self._handles 
    92         return h2.y + height 
     92        h2.y = h1.y + height 
    9393 
    9494 
  • gaphas/branches/hw/gaphas/item.py

    r1551 r1557  
    355355        h_se = handles[SE] 
    356356 
    357         w, h = self.width, self.height 
    358         x0, y0 = self._canvas.get_matrix_i2w(self, calculate=True).transform_point(0, 0) 
    359         h_nw.x = x0 
    360         h_nw.y = y0 
    361         h_se.x = x0 + w 
    362         h_se.y = y0 + h 
    363  
    364357        add = self.canvas.solver.add_constraint 
    365358        self._constraints = [