diff options
author | flavio <fdanesse@gmail.com> | 2012-07-19 00:05:25 (GMT) |
---|---|---|
committer | flavio <fdanesse@gmail.com> | 2012-07-19 00:05:25 (GMT) |
commit | c1b905046c4bfd681a82f32d9c26cefb789aed1b (patch) | |
tree | 9a5a6a4bd990665ecace471ed02ff0cbba3e9c32 /fft_mouth.py | |
parent | 773832227b3309e9ba327de6a4ebb5cc42b0b367 (diff) |
Cairo corrections
Diffstat (limited to 'fft_mouth.py')
-rw-r--r-- | fft_mouth.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fft_mouth.py b/fft_mouth.py index 8200ef6..f91d900 100644 --- a/fft_mouth.py +++ b/fft_mouth.py @@ -93,7 +93,7 @@ class FFTMouth(Mouth): self.peaks = val - def expose(self, widget, event): + def do_draw(self, context): """This function is the "expose" event handler and does all the drawing.""" @@ -102,15 +102,15 @@ class FFTMouth(Mouth): self.processBuffer(bounds) #Create context, disable antialiasing - self.context = widget.window.cairo_create() - self.context.set_antialias(cairo.ANTIALIAS_NONE) + self.context = context + #self.context.set_antialias(cairo.ANTIALIAS_NONE) #set a clip region for the expose event. #This reduces redrawing work (and time) - self.context.rectangle(event.area.x, - event.area.y, - event.area.width, - event.area.height) + self.context.rectangle(bounds.x, + bounds.y, + bounds.width, + bounds.height) self.context.clip() # background |