yes.
This commit is contained in:
parent
7adf75d0c4
commit
3a4255a3b9
1 changed files with 2 additions and 1 deletions
3
main.py
3
main.py
|
@ -90,6 +90,7 @@ def drawCanvas():
|
||||||
songinfo.text((songinfo_offset_x,songinfo_offset_y+10), song_name)
|
songinfo.text((songinfo_offset_x,songinfo_offset_y+10), song_name)
|
||||||
songinfo.text((songinfo_offset_x,songinfo_offset_y), artist_name)
|
songinfo.text((songinfo_offset_x,songinfo_offset_y), artist_name)
|
||||||
showImage(canvas)
|
showImage(canvas)
|
||||||
|
|
||||||
if(font.getsize(song_name)[0]>160):
|
if(font.getsize(song_name)[0]>160):
|
||||||
x = threading.Thread(target=scrolling_text,args=(song_name,songinfo_offset_x,songinfo_offset_y+10))
|
x = threading.Thread(target=scrolling_text,args=(song_name,songinfo_offset_x,songinfo_offset_y+10))
|
||||||
if(font.getsize(artist_name)[0]>160):
|
if(font.getsize(artist_name)[0]>160):
|
||||||
|
@ -102,7 +103,7 @@ def scrolling_text(text,offset_x=0,offset_y=0):
|
||||||
scrolled_text_canvas = Image.new('RGB', (10, 32), color = 'black')
|
scrolled_text_canvas = Image.new('RGB', (10, 32), color = 'black')
|
||||||
scrolled_text = ImageDraw.Draw(scrolled_text)
|
scrolled_text = ImageDraw.Draw(scrolled_text)
|
||||||
scrolled_text.text((-i,0), text)
|
scrolled_text.text((-i,0), text)
|
||||||
showImage(canvas, offset_x, offset_y)
|
showImage(scrolled_text_canvas, offset_x, offset_y)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue