From 7b9e5d610acd3cf79688bd5110e0f40dce23a214 Mon Sep 17 00:00:00 2001 From: Lukas Schulz Date: Sun, 20 Dec 2020 01:00:31 +0100 Subject: [PATCH] yes. --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index ff380e0..634d8a1 100644 --- a/main.py +++ b/main.py @@ -90,9 +90,7 @@ def drawCanvas(): songinfo.text((songinfo_offset_x,songinfo_offset_y+10), song_name) songinfo.text((songinfo_offset_x,songinfo_offset_y), artist_name) showImage(canvas) - print(font.getsize(song_name)[0]) if(font.getsize(song_name)[0]>160): - print('scrolling text') x = threading.Thread(target=scrolling_text,args=(song_name,songinfo_offset_x,songinfo_offset_y+10)) if(font.getsize(artist_name)[0]>160): y = threading.Thread(target=scrolling_text,args=(artist_name,songinfo_offset_x,songinfo_offset_y)) @@ -103,7 +101,7 @@ def scrolling_text(text,offset_x=0,offset_y=0): for i in range(160-font.getsize(text)[0]): scrolled_text_canvas = Image.new('RGB', (10, 32), color = 'black') scrolled_text = ImageDraw.Draw(scrolled_text) - scrolled_text.text((-i,0), text) + scrolled_text.text((i,0), text) showImage(scrolled_text_canvas, offset_x, offset_y) time.sleep(1) print('scrolled '+i)