better lines
This commit is contained in:
parent
ed00996424
commit
11a43331ad
BIN
client/image.png
BIN
client/image.png
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.9 KiB |
@ -27,6 +27,7 @@ class ProjectView(tk.Frame, AbstractView):
|
|||||||
self.save_button = None
|
self.save_button = None
|
||||||
self.bottom_frame = None
|
self.bottom_frame = None
|
||||||
self.top_frame = None
|
self.top_frame = None
|
||||||
|
self.first_time=True
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_view_name() -> str:
|
def get_view_name() -> str:
|
||||||
@ -70,14 +71,24 @@ class ProjectView(tk.Frame, AbstractView):
|
|||||||
if start_stop == 'start':
|
if start_stop == 'start':
|
||||||
print('start')
|
print('start')
|
||||||
self.start_draw = True
|
self.start_draw = True
|
||||||
|
self.first_time = True
|
||||||
elif start_stop == 'stop':
|
elif start_stop == 'stop':
|
||||||
print('stop')
|
print('stop')
|
||||||
self.start_draw = False
|
self.start_draw = False
|
||||||
|
self.first_time = False
|
||||||
if self.start_draw and index_finger['straight']:
|
if self.start_draw and index_finger['straight']:
|
||||||
|
|
||||||
x = index_finger['x']
|
x = index_finger['x']
|
||||||
y = index_finger['y']
|
y = index_finger['y']
|
||||||
x, y = self.scale_points(x, 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:
|
if success:
|
||||||
self.photo = PIL.ImageTk.PhotoImage(image=PIL.Image.fromarray(frame))
|
self.photo = PIL.ImageTk.PhotoImage(image=PIL.Image.fromarray(frame))
|
||||||
self.vid_canvas.create_image(0, 0, image=self.photo, anchor=tk.NW)
|
self.vid_canvas.create_image(0, 0, image=self.photo, anchor=tk.NW)
|
||||||
|
Loading…
Reference in New Issue
Block a user