Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2013-01-03 21:02:46 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2013-01-09 11:53:41 (GMT)
commit242de7a18dcb8e03def2a3293c74e6c13cafdebb (patch)
treec602c439c8372ca77b5ed3910c7da0443b6fad62
parentbdb8d13031efe405bc87705ccc49b6f8963d9c90 (diff)
Fix artifact using line tool - SL #4363
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--Desenho.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Desenho.py b/Desenho.py
index 04fc602..50ac4fa 100644
--- a/Desenho.py
+++ b/Desenho.py
@@ -117,12 +117,15 @@ class Desenho:
else:
ctx = widget.drawing_ctx
+ ctx.save()
+ ctx.new_path()
ctx.set_line_width(widget.tool['line size'])
ctx.set_line_cap(cairo.LINE_CAP_ROUND)
ctx.set_source_rgba(*widget.tool['cairo_stroke_color'])
ctx.move_to(widget.oldx, widget.oldy)
ctx.line_to(coords[0], coords[1])
ctx.stroke()
+ ctx.restore()
# TODO: clip
widget.queue_draw()