Merge pull request #8257 from radarhere/imagedraw_unused

This commit is contained in:
Hugo van Kemenade 2024-07-24 20:24:14 +03:00 committed by GitHub
commit a103c4a044
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -623,7 +623,7 @@ class ImageDraw:
return fill_ink
return ink
def draw_text(ink, stroke_width=0, stroke_offset=None) -> None:
def draw_text(ink, stroke_width=0) -> None:
mode = self.fontmode
if stroke_width == 0 and embedded_color:
mode = "RGBA"
@ -664,8 +664,6 @@ class ImageDraw:
)
except TypeError:
mask = font.getmask(text)
if stroke_offset:
coord = [coord[0] + stroke_offset[0], coord[1] + stroke_offset[1]]
if mode == "RGBA":
# font.getmask2(mode="RGBA") returns color in RGB bands and mask in A
# extract mask and set text alpha