Changeset 1136

Show
Ignore:
Timestamp:
02/21/07 12:31:42 (2 years ago)
Author:
arjanmol
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gaphas/trunk/gaphas/canvas.py

    r1133 r1136  
    354354        """ 
    355355        self._in_update = True 
     356        dirty_items = [] 
    356357        try: 
    357358            cairo_context = self._obtain_cairo_context() 
     
    494495        else: 
    495496            surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 0, 0) 
    496             return cairo.Context(tmpsurface) 
     497            return cairo.Context(surface) 
    497498 
    498499 
  • gaphas/trunk/gaphas/item.py

    r1134 r1136  
    177177        self._handles = [ h(strength=STRONG) for h in [Handle]*4 ] 
    178178        self._constraints = [] 
    179         self.min_width = 10 
    180         self.min_height = 10 
     179        self._min_width = 10 
     180        self._min_height = 10 
    181181        self.width = width 
    182182        self.height = height 
     
    235235 
    236236    height = property(_get_height, _set_height) 
     237 
     238    def _set_min_width(self, min_width): 
     239        """ 
     240        """ 
     241        self._min_width = max(0, min_width) 
     242        if min_width > self.width: 
     243            self.width = min_width 
     244 
     245    min_width = property(lambda s: s._min_width, _set_min_width) 
     246 
     247    def _set_min_height(self, min_height): 
     248        """ 
     249        """ 
     250        self._min_height = max(0, min_height) 
     251        if min_height > self.height: 
     252            self.height = min_height 
     253 
     254    min_height = property(lambda s: s._min_height, _set_min_height) 
    237255 
    238256    def setup_canvas(self):