Um, yes
This commit is contained in:
parent
8866e31919
commit
08dec86316
12
async-bot.py
12
async-bot.py
|
@ -65,18 +65,14 @@ class AsyncBotManager:
|
|||
) as im:
|
||||
draw = ImageDraw.Draw(im)
|
||||
draw.rectangle(
|
||||
(0, 0, im.width, im.height), (255 if negative else 0, 0)
|
||||
)
|
||||
draw.text(
|
||||
(left + 2, top + 2),
|
||||
text,
|
||||
font=font,
|
||||
fill=(0 if negative else 255, 0),
|
||||
anchor="lt",
|
||||
(0, 0, im.width, im.height), (0, 0)
|
||||
)
|
||||
draw.text((left + 2, top + 2), text, font=font, fill=255, anchor="lt")
|
||||
|
||||
alpha = im.convert("L").filter(ImageFilter.MaxFilter(5))
|
||||
im.putalpha(alpha)
|
||||
if negative:
|
||||
im = ImageChops.invert(im)
|
||||
return im.copy()
|
||||
|
||||
def get_font(self, font_name: str, size: int = 8):
|
||||
|
|
Loading…
Reference in New Issue