diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2012-07-24 18:21:43 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-08-10 13:49:30 (GMT) |
commit | 1a0de2965f7a9c3b147b6b08054f648cd4bc3614 (patch) | |
tree | bbd5084777c7c45e38d96dbbe3165210a80fdbe3 /widgets.py | |
parent | ca94b8e6eaf957b439486e4ab93725586e530e57 (diff) |
Implement stamp tool with cairo
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'widgets.py')
-rw-r--r-- | widgets.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |