Changeset 81 for trunk/src/pie.py

Show
Ignore:
Timestamp:
03/21/08 13:32:34 (4 years ago)
Author:
lgs
Message:

Support for drawing the whole background in a solid color. Patch by jae. See #6

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/pie.py

    r66 r81  
    8080         
    8181        cx.save() 
    82         cx.set_source_rgb(*hex2rgb(self.options.background.color)) 
    83         cx.rectangle(self.area.x, self.area.y, self.area.w, self.area.h) 
    84         cx.fill() 
     82 
     83        if self.options.background.baseColor: 
     84            cx.set_source_rgb(*hex2rgb(self.options.background.baseColor)) 
     85            x, y, w, h = 0, 0, self.area.w, self.area.h 
     86            w += self.options.padding.left + self.options.padding.right 
     87            h += self.options.padding.top + self.options.padding.bottom 
     88            cx.rectangle(x, y, w, h) 
     89            cx.fill() 
     90         
    8591        cx.restore() 
    8692