diff --git a/client/image.png b/client/image.png index 0ca85f7..e259880 100644 Binary files a/client/image.png and b/client/image.png differ diff --git a/client/views/project_view.py b/client/views/project_view.py index ae936bc..3072c22 100644 --- a/client/views/project_view.py +++ b/client/views/project_view.py @@ -27,6 +27,7 @@ class ProjectView(tk.Frame, AbstractView): self.save_button = None self.bottom_frame = None self.top_frame = None + self.first_time=True @staticmethod def get_view_name() -> str: @@ -70,14 +71,24 @@ class ProjectView(tk.Frame, AbstractView): if start_stop == 'start': print('start') self.start_draw = True + self.first_time = True elif start_stop == 'stop': print('stop') self.start_draw = False + self.first_time = False if self.start_draw and index_finger['straight']: + x = index_finger['x'] y = index_finger['y'] x, y = self.scale_points(x, y) - self.canvas.create_line(x, y, x+1, y, x-1, y, tags='point', width=3) + if self.first_time == True: + self.previous_x = x + self.previous_y = y + self.first_time = False + #print("first_time") + self.canvas.create_line(x, y, x+1, y+1, self.previous_x, self.previous_y, tags='point', width=3) + self.previous_x = x + self.previous_y = y if success: self.photo = PIL.ImageTk.PhotoImage(image=PIL.Image.fromarray(frame)) self.vid_canvas.create_image(0, 0, image=self.photo, anchor=tk.NW)