From 85e89eae4cdeb3dd89549b12a6034cf68ae52f1b Mon Sep 17 00:00:00 2001 From: Amy Bowersox Date: Wed, 11 Dec 2019 14:55:34 -0700 Subject: [PATCH] revised the feedback for freehand --- scripts/demo1.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/demo1.py b/scripts/demo1.py index 69eb17a..31b781d 100755 --- a/scripts/demo1.py +++ b/scripts/demo1.py @@ -59,11 +59,15 @@ current_y = 0 def freehand_draw(x, y, down, up): global current_x, current_y - hdc.text_color = color_list[current_color] - hdc.move_to(current_x, current_y) - hdc.line_to(x, y) - current_x = x - current_y = y + if down: + current_x = origin_x + current_y = origin_y + else: + hdc.text_color = color_list[current_color] + hdc.move_to(current_x, current_y) + hdc.line_to(x, y) + current_x = x + current_y = y def rubberband_rectangle(x, y, down, up): global current_x, current_y