yes.
This commit is contained in:
parent
06d23ca3e2
commit
dc7f6b57f3
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -111,7 +111,7 @@ def drawCanvas():
|
||||||
|
|
||||||
def scrolling_text(text,offset_x=0,offset_y=0):
|
def scrolling_text(text,offset_x=0,offset_y=0):
|
||||||
for i in range(font.getsize(text)[0]-160):
|
for i in range(font.getsize(text)[0]-160):
|
||||||
scrolled_text_canvas = Image.new('RGB', (160, 10), color = 'black')
|
scrolled_text_canvas = Image.new('RGB', (160, 11), color = 'black')
|
||||||
scrolled_text = ImageDraw.Draw(scrolled_text_canvas)
|
scrolled_text = ImageDraw.Draw(scrolled_text_canvas)
|
||||||
scrolled_text.text((-i,0), text)
|
scrolled_text.text((-i,0), text)
|
||||||
showImage(scrolled_text_canvas, offset_x, offset_y)
|
showImage(scrolled_text_canvas, offset_x, offset_y)
|
||||||
|
@ -119,7 +119,7 @@ def scrolling_text(text,offset_x=0,offset_y=0):
|
||||||
#print('scrolled '+str(i)+' px')
|
#print('scrolled '+str(i)+' px')
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
for i in range(font.getsize(text)[0]-160):
|
for i in range(font.getsize(text)[0]-160):
|
||||||
scrolled_text_canvas = Image.new('RGB', (160, 10), color = 'black')
|
scrolled_text_canvas = Image.new('RGB', (160, 11), color = 'black')
|
||||||
scrolled_text = ImageDraw.Draw(scrolled_text_canvas)
|
scrolled_text = ImageDraw.Draw(scrolled_text_canvas)
|
||||||
scrolled_text.text(((-(font.getsize(text)[0]-160))+i+1,0), text)
|
scrolled_text.text(((-(font.getsize(text)[0]-160))+i+1,0), text)
|
||||||
showImage(scrolled_text_canvas, offset_x, offset_y)
|
showImage(scrolled_text_canvas, offset_x, offset_y)
|
||||||
|
|
Loading…
Reference in a new issue