mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 00:04:28 +01:00
[GH-ISSUE #182] Feature request: #2307
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nigels0 on GitHub (Dec 18, 2023).
Original GitHub issue: https://github.com/OpenEPaperLink/OpenEPaperLink/issues/182
Is your feature request related to a problem? Please describe.
No - its an enhancement of function
Describe the solution you'd like
Really, its an enhancement to the draw function - to allow reverse image, so you can have, say white text in a red background - ideally, have an option when drawing text to say what the background is.
@nigels0 commented on GitHub (Dec 19, 2023):
Nevermind, managed to do it with the following code:
left, top, right, bottom = draw.textbbox((x,y) , args.line1, font=font)
draw.rectangle((left-2, top-5, right, bottom+5), fill = 'red')
@nlimper commented on GitHub (Dec 19, 2023):
I don’t know which language you are writing the code, but it’s not something within OpenEpaperLink. 😊
@nigels0 commented on GitHub (Dec 19, 2023):
Right - it is in python using the pillow library. Would be great to have a background option anyway.
@nlimper commented on GitHub (Dec 19, 2023):
The text is not antialiased (because the epaper only can display white/black/red without shades). So, if you use the json template, you can just draw a red box, and use white text.