mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Merge pull request #8257 from radarhere/imagedraw_unused
This commit is contained in:
commit
a103c4a044
|
@ -623,7 +623,7 @@ class ImageDraw:
|
||||||
return fill_ink
|
return fill_ink
|
||||||
return 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
|
mode = self.fontmode
|
||||||
if stroke_width == 0 and embedded_color:
|
if stroke_width == 0 and embedded_color:
|
||||||
mode = "RGBA"
|
mode = "RGBA"
|
||||||
|
@ -664,8 +664,6 @@ class ImageDraw:
|
||||||
)
|
)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
mask = font.getmask(text)
|
mask = font.getmask(text)
|
||||||
if stroke_offset:
|
|
||||||
coord = [coord[0] + stroke_offset[0], coord[1] + stroke_offset[1]]
|
|
||||||
if mode == "RGBA":
|
if mode == "RGBA":
|
||||||
# font.getmask2(mode="RGBA") returns color in RGB bands and mask in A
|
# font.getmask2(mode="RGBA") returns color in RGB bands and mask in A
|
||||||
# extract mask and set text alpha
|
# extract mask and set text alpha
|
||||||
|
|
Loading…
Reference in New Issue
Block a user