Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
bb0a2b209a
651 changed files with 24869 additions and 12505 deletions
|
|
@ -25,6 +25,7 @@ try:
|
|||
|
||||
font24 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 24)
|
||||
font18 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 18)
|
||||
font35 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 35)
|
||||
|
||||
# Drawing on the Horizontal image
|
||||
logging.info("1.Drawing on the Horizontal image...")
|
||||
|
|
@ -75,9 +76,35 @@ try:
|
|||
time.sleep(2)
|
||||
|
||||
logging.info("Clear...")
|
||||
epd.init()
|
||||
epd.Clear()
|
||||
|
||||
'''4Gray display'''
|
||||
logging.info("5.4Gray display--------------------------------")
|
||||
epd.Init_4Gray()
|
||||
|
||||
Limage = Image.new('L', (epd.width, epd.height), 0) # 255: clear the frame
|
||||
draw = ImageDraw.Draw(Limage)
|
||||
draw.text((20, 0), u'微雪电子', font = font35, fill = epd.GRAY1)
|
||||
draw.text((20, 35), u'微雪电子', font = font35, fill = epd.GRAY2)
|
||||
draw.text((20, 70), u'微雪电子', font = font35, fill = epd.GRAY3)
|
||||
draw.text((40, 110), 'hello world', font = font18, fill = epd.GRAY1)
|
||||
draw.line((10, 140, 60, 190), fill = epd.GRAY1)
|
||||
draw.line((60, 140, 10, 190), fill = epd.GRAY1)
|
||||
draw.rectangle((10, 140, 60, 190), outline = epd.GRAY1)
|
||||
draw.line((95, 140, 95, 190), fill = epd.GRAY1)
|
||||
draw.line((70, 165, 120, 165), fill = epd.GRAY1)
|
||||
draw.arc((70, 140, 120, 190), 0, 360, fill = epd.GRAY1)
|
||||
draw.rectangle((10, 200, 60, 250), fill = epd.GRAY1)
|
||||
draw.chord((70, 200, 120, 250), 0, 360, fill = epd.GRAY1)
|
||||
epd.display_4Gray(epd.getbuffer_4Gray(Limage))
|
||||
time.sleep(3)
|
||||
|
||||
#display 4Gra bmp
|
||||
Himage = Image.open(os.path.join(picdir, '4in2_Scale_1.bmp'))
|
||||
epd.display_4Gray(epd.getbuffer_4Gray(Himage))
|
||||
time.sleep(4)
|
||||
|
||||
epd.Clear()
|
||||
logging.info("Goto Sleep...")
|
||||
epd.sleep()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue