|
20 | 20 | str_btn_tips = 'touch to scan qrcode'
|
21 | 21 | str_no_url_tips1 = 'Get RTMP server address from live platforms'
|
22 | 22 | str_no_url_tips2 = 'Generate QRCode with server address'
|
23 |
| -str_scan_tips1 = '1. Get RTMP server addr from live platforms' |
| 23 | +str_scan_tips1 = '1. Get RTMP server addr from live platform' |
24 | 24 | str_scan_tips2 = ' format like rtmp://xxx.com/app/stream'
|
25 | 25 | str_scan_tips3 = '2. Generate QRCode with server addr, scan'
|
26 | 26 |
|
@@ -92,8 +92,8 @@ def parse_url(url):
|
92 | 92 |
|
93 | 93 | if len(global_url) == 0:
|
94 | 94 | color = image.Color.from_rgb(0x6e, 0x6e, 0x6e)
|
95 |
| - base_img.draw_string(base_img.width()//2 - image.string_size(str_no_url_tips1, 2).width()//2, int(base_img.height() * 0.15), str_no_url_tips1, color, 1.5) |
96 |
| - base_img.draw_string(base_img.width()//2 - image.string_size(str_no_url_tips2, 1.5).width()//2, int(base_img.height() * 0.15) + str_height_2 + 10, str_no_url_tips2, color, 1.5) |
| 95 | + base_img.draw_string(base_img.width()//2 - image.string_size(str_no_url_tips1, 1.5).width()//2, img_exit.height() + 15 , str_no_url_tips1, color, 1.5) |
| 96 | + base_img.draw_string(base_img.width()//2 - image.string_size(str_no_url_tips2, 1.5).width()//2, img_exit.height() + 15 + str_height_2 + 10, str_no_url_tips2, color, 1.5) |
97 | 97 | box = [base_img.width()//2-img_scan.width()//2, base_img.height()//2-50, 100, 100]
|
98 | 98 | if touch_box(t, box):
|
99 | 99 | base_img.draw_image(box[0], box[1], img_scan)
|
@@ -169,9 +169,9 @@ def parse_url(url):
|
169 | 169 | else:
|
170 | 170 | img.draw_image(box[0], box[1], img_exit)
|
171 | 171 |
|
172 |
| - img.draw_string(20, int(img.height() * 0.75), str_scan_tips1, image.Color.from_rgb(0x6e, 0x6e, 0x6e), 2) |
173 |
| - img.draw_string(20, int(img.height() * 0.75) + str_height_2 + 10, str_scan_tips2, image.Color.from_rgb(0x6e, 0x6e, 0x6e), 2) |
174 |
| - img.draw_string(20, int(img.height() * 0.75) + (str_height_2 + 10) * 2, str_scan_tips3, image.Color.from_rgb(0x6e, 0x6e, 0x6e), 2) |
| 172 | + img.draw_string(0, int(img.height() - (str_height_2 * 3 + 3 * 4)), str_scan_tips1, image.Color.from_rgb(0x6e, 0x6e, 0x6e), 2) |
| 173 | + img.draw_string(0, int(img.height() - (str_height_2 * 3 + 3 * 4)) + str_height_2 + 4, str_scan_tips2, image.Color.from_rgb(0x6e, 0x6e, 0x6e), 2) |
| 174 | + img.draw_string(0, int(img.height() - (str_height_2 * 3 + 3 * 4)) + str_height_2 * 2 + 4*2, str_scan_tips3, image.Color.from_rgb(0x6e, 0x6e, 0x6e), 2) |
175 | 175 | disp.show(img)
|
176 | 176 | del cam
|
177 | 177 | cam = None
|
|
0 commit comments