pre-create xy_range
This commit is contained in:
parent
e4f9ded5c8
commit
39d375ced0
1 changed files with 1 additions and 2 deletions
|
@ -162,11 +162,10 @@ async def gen_day_auto_image(
|
|||
image = await AdventImage.from_img(img, cfg)
|
||||
|
||||
rnd = await Random.get(day)
|
||||
xy_range = range(cfg.image.border, (cfg.image.size - cfg.image.border))
|
||||
|
||||
# Buchstaben verstecken
|
||||
for letter in day_parts[day]:
|
||||
xy_range = range(cfg.image.border, (cfg.image.size - cfg.image.border))
|
||||
|
||||
await image.hide_text(
|
||||
xy=cast(_XY, tuple(rnd.choices(xy_range, k=2))),
|
||||
text=letter,
|
||||
|
|
Loading…
Reference in a new issue