From 11a43331ad02c7c624f37881ff515f677d8d0183 Mon Sep 17 00:00:00 2001 From: Michal Maciaszek Date: Sun, 17 Jan 2021 10:19:13 +0100 Subject: [PATCH] better lines --- client/image.png | Bin 2813 -> 1965 bytes client/views/project_view.py | 13 ++++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/image.png b/client/image.png index 0ca85f71e7f29689dd9cb2fb6a91fcc4d44ec890..e25988085a928135e23b21a2ad59632c8a78d0c3 100644 GIT binary patch delta 1360 zcmV-W1+V)36|E1DBR>apNkl}7f`&0V>0H8iO1OPb%0F!|VWs!hUk$_Q=fK7i$@?Y%(03Nq2%hzAl zb*+0O&@4HGroAoM_Xq5JObf0br>OHNIfOne%koeLj)bbI=stHUn3)_xWe10zD*+fR z9_zZA6uF%oLJ3DM-(4&fhe7Q%$wI|KkZ1OPdN z9ac(V9&!jT`QZVfKH?A;23_Is-WbNOW#`atJTE znKY8yzllc1!N?(W;9!_tpdaF7&Oi>KCIje=K7KWDkVELws0}#vj`;l# z``4%^jaztu37r{xG4RnG!Vc3Ra8)~fYUfDkjvT@)y4Z2EuItxve*L+5s4X8q{gOj? z+`SKV69agH96~vxZU=4Wi)!ac=#CshIdw1Ay`+Dlm*ZqGW4=~}!tCHU<>%@8^5{wH z;-)FpnGT^S;jF0B#cDq@Wym2gpv{S}*_P}-dyg{Y5N^=yb+%1~PuD}A&Km4sGE@99eIRwU3aljgKU>%+u0)4xyH%+Ziwr~uykwe(Fe?5Bj^50m%aZLpn zIfOS37OvuNr_hNbZ8{qVQ^okDc*(; z)ZxY|O)(w9d*+x&Ijgil4j~b|8k}mHVk->*m=56pa|{g6RvG}XSPB3ZOM$1^rbHJ^ zhd?173`EQ15GcfSNXu-c0RZ<7fsc5^8iTP|3IK8l0PYknNklfRphCZ-0`1uHFEK@bmL?|L@=5-wU?{;4QO5 z05Ch`I`=7~`66&RIph#etD}Mk6eovV&y_{sa&pMd9@{qUUcUK%1mGZY$bn4tfL8n% zu-MDfBy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~vN07ro)qgupY@xgJf!)dBD5~}2ZR9@v($_!BIp!>J&-p!$AO*=G z$^TPy^2BleDy}iKxJ3){E*@`Tj~zh{2UY*=RDTNx_Y^(Et zC4pm2ETB2}nlrr|>VVQTvqSnP$wxTy(z?tic8;7La&ydGcQu}9P7kZ057 z+cE2^}As$8}hw#_i+a^6r z2ZNA9#(y7h^eRu>*&$@5j7`uVIizR%&gWDRIwps(%$Un}R~d6BkNK)E zCx<{?uGexJIizO>P+%rGgk>a_y_ox!B8Na-BEe}qh7SN9!w1T6*De>bSPCl{yP+p? z2!EVyv`-RlnQ4L?0#!%_7m`C*$=J;&qfLMNAcw%&MvKH~ueVWh2>Wxb=*A?8hR7kn z4j$Vt|1I(uJ^+{C3xeBa5W~V0H+!&oU|7`3I6V0I*mJ0F!YCC6izWHj`inHj`inHj`inHj`in jHj`inHj`inHx_>ZhWlCKrA$xG00000NkvXXu0mjf55agE 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)