Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/waveform_mouth.py
diff options
context:
space:
mode:
authorflavio <fdanesse@gmail.com>2012-07-19 00:05:25 (GMT)
committer flavio <fdanesse@gmail.com>2012-07-19 00:05:25 (GMT)
commitc1b905046c4bfd681a82f32d9c26cefb789aed1b (patch)
tree9a5a6a4bd990665ecace471ed02ff0cbba3e9c32 /waveform_mouth.py
parent773832227b3309e9ba327de6a4ebb5cc42b0b367 (diff)
Cairo corrections
Diffstat (limited to 'waveform_mouth.py')
-rw-r--r--waveform_mouth.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/waveform_mouth.py b/waveform_mouth.py
index b9c4238..c3a4ba5 100644
--- a/waveform_mouth.py
+++ b/waveform_mouth.py
@@ -39,7 +39,7 @@ class WaveformMouth(Mouth):
self.y_mag_bias_multiplier = 1
self.y_mag = 0.7
- def expose(self, widget, event):
+ def do_draw(self, context):
"""This function is the "expose"
event handler and does all the drawing."""
@@ -48,15 +48,15 @@ class WaveformMouth(Mouth):
self.param2 = bounds.height / 2.0
#Create context, disable antialiasing
- self.context = widget.window.cairo_create()
+ 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