Changeset 177 for trunk

Show
Ignore:
Timestamp:
03/22/09 03:54:13 (3 years ago)
Author:
lgs
Message:

It looks like Cairo do unexpected things with the order of rectangle, fill and set_source_rgb. Fixes #25

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pycha/bar.py

    r176 r177  
    7979 
    8080            if self.options.shouldFill or (not self.options.stroke.hide): 
    81                 cx.rectangle(x, y, w, h) 
    8281 
    8382                if self.options.shouldFill: 
    8483                    cx.set_source_rgb(*self.colorScheme[bar.name]) 
    85                     cx.fill_preserve() 
     84                    cx.rectangle(x, y, w, h) 
     85                    cx.fill() 
    8686 
    8787                if not self.options.stroke.hide: 
    8888                    cx.set_source_rgb(*hex2rgb(self.options.stroke.color)) 
     89                    cx.rectangle(x, y, w, h) 
    8990                    cx.stroke() 
    9091