mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-09 23:04:45 +03:00
Removed unused argument in ImageDraw text
This commit is contained in:
parent
c75a61407d
commit
16f0669f3a
|
@ -266,9 +266,9 @@ class ImageDraw(object):
|
||||||
|
|
||||||
return text.split(split_character)
|
return text.split(split_character)
|
||||||
|
|
||||||
def text(self, xy, text, fill=None, font=None, anchor=None):
|
def text(self, xy, text, fill=None, font=None):
|
||||||
if self._multiline_check(text):
|
if self._multiline_check(text):
|
||||||
return self.multiline_text(xy, text, fill, font, anchor)
|
return self.multiline_text(xy, text, fill, font)
|
||||||
|
|
||||||
ink, fill = self._getink(fill)
|
ink, fill = self._getink(fill)
|
||||||
if font is None:
|
if font is None:
|
||||||
|
@ -286,7 +286,7 @@ class ImageDraw(object):
|
||||||
mask = font.getmask(text)
|
mask = font.getmask(text)
|
||||||
self.draw.draw_bitmap(xy, mask, ink)
|
self.draw.draw_bitmap(xy, mask, ink)
|
||||||
|
|
||||||
def multiline_text(self, xy, text, fill=None, font=None, anchor=None,
|
def multiline_text(self, xy, text, fill=None, font=None,
|
||||||
spacing=0, align="left"):
|
spacing=0, align="left"):
|
||||||
widths, heights = [], []
|
widths, heights = [], []
|
||||||
max_width = 0
|
max_width = 0
|
||||||
|
@ -306,7 +306,7 @@ class ImageDraw(object):
|
||||||
left += (max_width - widths[idx])
|
left += (max_width - widths[idx])
|
||||||
else:
|
else:
|
||||||
assert False, 'align must be "left", "center" or "right"'
|
assert False, 'align must be "left", "center" or "right"'
|
||||||
self.text((left, top), line, fill, font, anchor)
|
self.text((left, top), line, fill, font)
|
||||||
top += heights[idx] + spacing
|
top += heights[idx] + spacing
|
||||||
left = xy[0]
|
left = xy[0]
|
||||||
|
|
||||||
|
|
|
@ -227,7 +227,7 @@ Methods
|
||||||
|
|
||||||
Draw a shape.
|
Draw a shape.
|
||||||
|
|
||||||
.. py:method:: PIL.ImageDraw.Draw.text(xy, text, fill=None, font=None, anchor=None)
|
.. py:method:: PIL.ImageDraw.Draw.text(xy, text, fill=None, font=None)
|
||||||
|
|
||||||
Draws the string at the given position.
|
Draws the string at the given position.
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ Methods
|
||||||
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
|
:param font: An :py:class:`~PIL.ImageFont.ImageFont` instance.
|
||||||
:param fill: Color to use for the text.
|
:param fill: Color to use for the text.
|
||||||
|
|
||||||
.. py:method:: PIL.ImageDraw.Draw.multiline_text(xy, text, fill=None, font=None, anchor=None, spacing=0, align="left")
|
.. py:method:: PIL.ImageDraw.Draw.multiline_text(xy, text, fill=None, font=None, spacing=0, align="left")
|
||||||
|
|
||||||
Draws the string at the given position.
|
Draws the string at the given position.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user