Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/overlayer.py
diff options
context:
space:
mode:
authorerick <erick@sugar-dev-erick.(none)>2009-12-02 14:10:28 (GMT)
committer erick <erick@sugar-dev-erick.(none)>2009-12-02 14:10:28 (GMT)
commit0271519aaa88fc97ae55214ea7e003a5a0e256c2 (patch)
tree0eaa9ba91c6d24839352662a3fb99b011681a87d /tutorius/overlayer.py
parentc5b1fdddf6ca68d3174eb02eccce1f7d7725d815 (diff)
Added FrameOverlayer with support for installing and uninstalling actions
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()