shahriyardx / easy-pil

A library to make common tasks of Pillow easy.
https://easy-pil.readthedocs.io/
MIT License
41 stars 15 forks source link

Add a stroke parameter to Editor.text #21

Closed hearot closed 1 year ago

hearot commented 1 year ago

Here is an example by editing welcome_image2.py.

Before

background.text(
    (400, 260), "WELCOME", color="white", font=poppins, align="center"
)

image

After

background.text(
    (400, 260), "WELCOME", color="white", font=poppins, align="center", stroke=2
)

image

shahriyardx commented 1 year ago

Can you update it to stroke_width because other methods that implement stroke has it named stroke_width so it will be match for all

hearot commented 1 year ago

Actually, it's not stroke_width only. It's also about the color. Currently I have it so that you pass a tuple (width, color) to stroke (and if you pass only a integer, it is interpreted as (width, "black"). Do you want them to be separated like stroke_width and stroke_fill (as it is in PIL)?

hearot commented 1 year ago

OK. What about now?