Changeset 1626

Show
Ignore:
Timestamp:
07/12/07 11:50:15 (1 year ago)
Author:
wrobe..@pld-linux.org
Message:

- recalculate bounding box using appropriate view matrices

Files:

Legend:

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

    r1622 r1626  
    237237        # bounding boxes are calculated. Now, the child objects should not 
    238238        # be hindered by their own matrix settings. 
    239         c2i = self._canvas.get_matrix_c2i(item).transform_point 
    240         ix0, iy0 = c2i(bounds.x, bounds.y) 
    241         ix1, iy1 = c2i(bounds.x1, bounds.y1) 
     239        v2i = self.get_matrix_v2i(item).transform_point 
     240        ix0, iy0 = v2i(bounds.x, bounds.y) 
     241        ix1, iy1 = v2i(bounds.x1, bounds.y1) 
    242242        self._item_bounds[item] = bounds, Rectangle(ix0, iy0, x1=ix1, y1=iy1) 
    243243 
     
    538538                    self.queue_draw_item(i) 
    539539 
    540                     i2c = self._canvas.get_matrix_i2c(i).transform_point 
    541                     x0, y0 = i2c(bounds.x, bounds.y) 
    542                     x1, y1 = i2c(bounds.x1, bounds.y1) 
     540                    i2v = self.get_matrix_i2v(i).transform_point 
     541                    x0, y0 = i2v(bounds.x, bounds.y) 
     542                    x1, y1 = i2v(bounds.x1, bounds.y1) 
    543543                    cbounds = Rectangle(x0, y0, x1=x1, y1=y1) 
    544544                    self._item_bounds[i] = cbounds, bounds