Only render the flag where it's visible.

We now don't have to re-render the name on each flag change.
sammachin-gprs
MisguidedEmails 2018-09-02 23:42:55 +01:00
parent f19cffd307
commit 229f09acd4
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ def draw_flag(colours):
colour_width = ugfx.width() / len(colours)
for num, colour in enumerate(colours):
width_loc = int(num * colour_width)
ugfx.area(width_loc, 0, int(colour_width), 320, ugfx.html_color(colour))
flag_height = ugfx.height() - (name_height + info_height)
ugfx.area(width_loc, info_height, int(colour_width), flag_height, ugfx.html_color(colour))
def draw_name():