yes.
This commit is contained in:
parent
741f728320
commit
37a7991c58
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -90,7 +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)
|
||||
scrolling_text(song_name,songinfo_offset_x, songinfo_offset_y+10)
|
||||
#scrolling_text(song_name,songinfo_offset_x, songinfo_offset_y+10)
|
||||
if(font.getsize(song_name)[0]>160):
|
||||
x = threading.Thread(target=scrolling_text,args=(song_name,songinfo_offset_x,songinfo_offset_y+10))
|
||||
x.start()
|
||||
|
@ -102,7 +102,7 @@ def drawCanvas():
|
|||
|
||||
|
||||
def scrolling_text(text,offset_x=0,offset_y=0):
|
||||
for i in range(160-font.getsize(text)[0]):
|
||||
for i in range(font.getsize(text)[0]-160):
|
||||
scrolled_text_canvas = Image.new('RGB', (10, 32), color = 'black')
|
||||
scrolled_text = ImageDraw.Draw(scrolled_text)
|
||||
scrolled_text.text((-i,0), text)
|
||||
|
|
Loading…
Reference in a new issue