From 181c0a8dfc5fd434a978498840586e3d2b3637ba Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Mon, 02 Sep 2013 14:31:37 +0000 Subject: Save and restore tools state in the metadata - SL #2708 Signed-off-by: Puneet Kaur Acked-by: Gonzalo Odiard --- (limited to 'Desenho.py') diff --git a/Desenho.py b/Desenho.py index 7c734b1..fd5aea4 100644 --- a/Desenho.py +++ b/Desenho.py @@ -212,6 +212,7 @@ class Desenho: widget.desenha = False size = widget.tool['line size'] shape = widget.tool['line shape'] + if shape == 'circle': if last: widget.drawing_ctx.set_line_width(size) @@ -226,6 +227,9 @@ class Desenho: coords[1]) widget.drawing_ctx.arc(coords[0], coords[1], size / 2, 0., 2 * math.pi) + # when activity starts with rainbow tool, need this to + # not paint the background + widget.drawing_ctx.set_source_rgba(1.0, 1.0, 1.0, 0.0) widget.drawing_ctx.fill() elif shape == 'square': @@ -249,6 +253,9 @@ class Desenho: coords[1] - size / 2) widget.drawing_ctx.rectangle(coords[0] - size / 2, coords[1] - size / 2, size, size) + # when activity starts with rainbow tool, need this to + # not paint the background + widget.drawing_ctx.set_source_rgba(1.0, 1.0, 1.0, 0.0) widget.drawing_ctx.fill() if last: -- cgit v0.9.1