Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/overlayer.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/overlayer.py')
-rw-r--r--tutorius/overlayer.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tutorius/overlayer.py b/tutorius/overlayer.py
index ef6fed5..8c653ac 100644
--- a/tutorius/overlayer.py
+++ b/tutorius/overlayer.py
@@ -480,13 +480,20 @@ class TextBubbleWImg(gtk.Widget):
#ct = cairo.Context(surface)
# paint image
+ img_upper_left_x = int((self.allocation.width-self.imgsize[0])/2)
+ img_upper_left_y = int(self.line_width+self.padding/2)
context.set_source_pixbuf(
self.pixbuf,
- int((self.allocation.width-self.imgsize[0])/2),
- int(self.line_width+self.padding/2))
+ img_upper_left_x,
+ img_upper_left_y)
+ # Set a rectangle
+ context.rectangle(img_upper_left_x, img_upper_left_y,
+ self.imgsize[0], self.imgsize[1])
+ context.clip()
context.paint()
-
+ context.reset_clip()
+
# work done. Be kind to next cairo widgets and reset matrix.
context.identity_matrix()