Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/widgets.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-07-24 18:21:43 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-08-10 13:49:30 (GMT)
commit1a0de2965f7a9c3b147b6b08054f648cd4bc3614 (patch)
treebbd5084777c7c45e38d96dbbe3165210a80fdbe3 /widgets.py
parentca94b8e6eaf957b439486e4ab93725586e530e57 (diff)
Implement stamp tool with cairo
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'widgets.py')
-rw-r--r--widgets.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/widgets.py b/widgets.py
index 34d8a83..69890a1 100644
--- a/widgets.py
+++ b/widgets.py
@@ -123,8 +123,11 @@ class BrushButton(_ColorButton):
height = self._resized_stamp.get_height()
dx = center - width / 2
dy = center - height / 2
- self.pixmap.draw_pixbuf(self._gc, self._resized_stamp,
- 0, 0, dx, dy, width, height)
+
+ self._ctx.rectangle(dx, dy, width, height)
+ temp_ctx = gtk.gdk.CairoContext(self._ctx)
+ temp_ctx.set_source_pixbuf(self._resized_stamp, 0, 0)
+ self._ctx.paint()
else:
red = float(self._color.red) / 65535.0